Write a program to convert the input numbers to another number
system.
1. Decimal to Binary
2. Binary to Decimal
3. Hexadecimal to Decimal
4. Decimal to Hexadecimal
5. Binary to Hexadecimal
6. Hexadecimal to Binary
The user will type in the input number as following:
Binary number : up to 8 bits
Hexadecimal number: up to 2 bytes
Decimal number: Less than 256
As a result, print out the output after the conversion with
their input numbers.
The program...
Problem: Convert the following binary number to decimal.
1. 110101.101
Problem: Convert the following decimal number to fractional binary
representation.
1. 103.5625
(1) Convert negative fractional decimal
number to 8-bit binary number: –
6.625
Hint: –7 + 0.375
Given the hint above, the fractional number will be divided into
two parts,
- Whole number,
- Fractional part, must be positive
(2) Use 2's complement binary format to convert
negative fractional decimal number to 8-bit binary
number: – 6.625
(3) Proof to check that your representation
calculation for (1) & (2) is correct
HCS12 Assembly Language:
1. Write a program to convert a decimal number
stored at memory location $1010 into a binary number. Store the
result in memory location $2000
Note: Show All the steps of your work.
1. Convert the following decimal real number to a binary
number with six places to the right of the binary point.
57.553
2. Represent the following decimal integer numbers in binary
using 8-bit signed magnitude, one’s complement, and two’s
complement representations:
(a) 65 (b) -24
3. What is the value of the 8-bit binary number 10011110 in
decimal assuming the following representation: (a) unsigned, (b)
sign-magnitude, (c) one’s complement, (d) two’s complement....