Question #45916

Divide 0001010001001001 (BCD) by (1001)2 and express the result in octal equivalent .

Expert's answer

Answer on Question #45916, Programming, Other

Divide 0001010001001001 (BCD) by (1001)2 and express the result in octal equivalent.

Binary-coded decimal (BCD) is a class of binary encodings of decimal numbers where each decimal digit is represented by a fixed number of bits, usually four or eight

In this case every four bits represents one decimal digit


0001 0100 0100 1001 (BCD)=1449100001\ 0100\ 0100\ 1001\ (BCD) = 1449_{10}


Each digit of the binary number is 2n2^n in decimal


10012=123+122+121+120=9101001_2 = 1 \cdot 2^3 + 1 \cdot 2^2 + 1 \cdot 2^1 + 1 \cdot 2^0 = 9_{10}0001 0100 0100 1001 (BCD)10012=144910910=16110\frac{0001\ 0100\ 0100\ 1001\ (BCD)}{1001_2} = \frac{1449_{10}}{9_{10}} = 161_{10}


For binary - octal translation we may use series of divisions by 8 :

Take remainder of the division by 8, it will be smallest octal digit.


1618=1\left\lfloor \frac{161}{8} \right\rfloor = 1


Then work with integer part of division by 8, as with input number, and do the same operation's till it become zero


1618=20\left\lfloor \frac{161}{8} \right\rfloor = 20208=4\left\lfloor \frac{20}{8} \right\rfloor = 4168=2\left\lfloor \frac{16}{8} \right\rfloor = 228=2\left\lfloor \frac{2}{8} \right\rfloor = 228=0\left\lfloor \frac{2}{8} \right\rfloor = 0


The end of cycle

And we get :


16110=2418161_{10} = 241_8


http://www.AssignmentExpert.com/

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS