What would be the best binary representation for each of the following applications?
- Phone number
- Age (positive integer)
- Test grade
- Checking account balance
- Value read from a postal scale - Price
Phone number:
Decimal (Base 10) Number System
Decimal number system has ten symbols: 0
,
1
, 2
, 3
, 4
,
5
, 6
, 7
, 8
, and
9
, called digits. It uses positional
notation. That is, the least-significant digit (right-most
digit) is of the order of 10^0
the second right-most digit is of the order of 10^1
the third right-most digit is of the order of 10^2
where ^
denotes exponent
Example:
735 = 700 + 30 + 5 = 7×10^2 + 3×10^1 + 5×10^0
Age:
I am attaching the table whivh will help to get all Decimal Binary and HexaDecimal values:
For example, a sixteen bit variable can be represented by 0xAB12
binary simply take each individual numeral, convert it as per
the table and join them all together 16-bit binary number
1010101100010010
Get Answers For Free
Most questions answered within 1 hours.