Digital System:: A Digital System Is A System That Stores Data in A Discrete Way
Digital System:: A Digital System Is A System That Stores Data in A Discrete Way
i -j
i= 0 to n
Σ (a i
r ) + j= 1 to m
Σ (a j
r )
Example : Base-r to Decimal Conversion
Octal to Decimal
(127.4)8 = 1x82 + 2x81 + 7x80 + 4x8-1 = (87.5)10
Hexadecimal to Decimal
(B65F)16 = 11x163 + 6x162 + 5x161 + 15x160 = (46687)10
Binary to Decimal
(110101)2 = 1x25 + 1x24 + 0x23 + 1x22 + 0x21 + 1x20 = (53)10
Converting Decimal integer to any Base-r
General Rule
▪ Simply repeat dividing the number and all successive
quotients by r and saving the remainder
(1) 105 / 2 = 52 1 1
(2) 52 / 2 = 26 0 01
(3) 26 / 2 = 13 0 001
(4) 13 / 2 = 6 1 1001
(5) 6/2= 3 0 01001
(6) 3/2= 1 1 101001
(7) 1/2= 0 1 1101001
So 105 in decimal is written as 1101001 in binary.
Converting Decimal to Octal
▪ Simply repeat dividing by 8 and saving the remainder.
▪ First remainder will be the last digit in the octal number
▪ Second remainder will be the second digit from the right;
….. and so on.
▪ First integer will be the fast digit from left after the radix
point, Second integer will be the second digit from the left
after radix point ….. and so on
Converting Decimal fraction number to Base-r
Example: convert (0.6875)10 to binary Base-2
(0.6875)10 = (0.1011)2
Conversion of Decimal number
with radix point to Base-r
▪Separate the integer and fraction part
▪Convert the integer and fraction point to Base-r number
separately
▪Combining the two answer
7 5 6 3 0 2 1
111 101 110 011 000 010 001
So 10110100111100101101001011 (binary)
= 2D3CB8B (hex)
= 264745513 (octal)
Converting from Hex to Binary
6 F 0 3 7 C 2
0110 1111 0000 0011 0111 1100 0010