conversion of decimal to binary(8 digit number)

Thread Starter

SHIV PRATAP SINGH

Joined Aug 7, 2016
1
hi,
i want to convert decimal no.
124.375
into 8 bit binary digit.
i.e the problem occuring when writting binary digit ,where should i start from left or right?
thnks
 

WBahn

Joined Mar 31, 2012
30,062
This sounds like homework of some kind. Is it?

An 8-bit binary number will let you express at most 256 distinct values.

What representation do you need to use? Signed/unsigned? Fixed point? Floating point?

If fixed point, where is the radix point located?

If floating point, how many bits for the exponent?

If fixed point, how many bits, minimum, are needed to represent 124? How many bits, minimum, are needed to represent 0.375 (i.e., 3/8)?

There are conversion algorithms that build the binary value starting from the left and some that start from the right. Which algorithm are you planning to use?
 
Top