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)=144910
Each digit of the binary number is 2n in decimal
10012=1⋅23+1⋅22+1⋅21+1⋅20=910100120001 0100 0100 1001 (BCD)=910144910=16110
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.
⌊8161⌋=1
Then work with integer part of division by 8, as with input number, and do the same operation's till it become zero
⌊8161⌋=20⌊820⌋=4⌊816⌋=2⌊82⌋=2⌊82⌋=0
The end of cycle
And we get :
16110=2418
http://www.AssignmentExpert.com/