Summary TheNumberSystem (2)
Summary TheNumberSystem (2)
• Denary
• Binary
• Hexadecimal
• Binary Addition
Denary to Binary Binary to Denary
• involves the value headings
▪ successive division by 2 until it reaches 0
(…,128,64,32,16,8,4,2,1)
▪ Write the reminders from bottom to top
• Add the values of 1
Example: Example:
Consider the conversion of the denary number, 59, into binary: Convert the binary number 11101110, into a denary number
59 ÷ 2 → 29, Remainder =1
29 ÷ 2 → 14, Remainder =1
128 64 32 16 8 4 2 1
14 ÷ 2 → 7, Remainder =0 1 1 1 0 1 1 1 0
7÷2 → 3 , Remainder =1
(128+64+32+8+4+2)= 238
3÷2 → 1, Remainder =1
Answer : 111011
Denary to Hexadecimal Hexadecimal to Denary
▪ involves the value headings of each
▪ successive division by 16 until it reaches 0
hexadecimal digit; that is, 4096, 256, 16 and 1.
▪ Write the reminders from bottom to top
▪ multiply each hex digit by its heading value
Example-1: Convert the denary number, 2004, ▪ Add all the resultant totals together to give
the denary number
into hexadecimal.
Example-1: 4 5 A
2004 ÷ 16 125, remainder =4
256 16 1
125 ÷ 16 7, remainder =13 (D)
4 5 A
7 ÷ 16 0, remainder = 7
(4x256) (5x16) (10x1)
1024 + 80 + 10 = 1114
Answer : 7D4
Answer : 1114
Binary to Hexadecimal Hexadecimal to Binary
▪ right to left, split the binary number into ▪ find the 4 bit code for each digit
groups of 4 bits.
▪ Put the groups together to form the binary
▪ If last group has less than 4bits, fill with 0s number
▪ Convert each 4 bit group into Hexadceimal
101111100001 4 5 A
B E 1 010001011010
Sum
Start from right column to left 0 1 1 1 0 0 0 1 Values
Answer : 01110001 5