In this lab, you will demonstrate the ability to work with decimal and hexadecimal numbers.
Required Setup and Tools
In this lab, you will need only paper and pencil to do the required work. However, the use of a calculator is permitted to verify the results of a calculation. The Windows calculator may be used for this purpose.
Task 1: Convert Decimal Number into Binary
1. Convert the decimal number 125 into binary. Use the division-by-two method shown in the following example below. Answer is: 1111101
2. Convert your binary result back into decimal to prove your answer is correct. This is also shown in the following example. Solution: 64 + 32 ...view middle of the document...
Click View on the toolbar and then choose Programmer.
To enter a binary number, first click the Bin radio button. Then, enter all the binary bits by clicking the 0 and 1 buttons.
To convert the binary number in the display into decimal, click the Dec radio button.
Task 3: Convert Decimal Number into Hexadecimal
1. Convert the decimal number 210 into hexadecimal. Use the division-by-sixteen method shown in the following example. Solution: 210 /16 = 13 r=2
13 /16 =0 r=13
2. Convert your hexadecimal result back into decimal to prove your answer is correct. This is also shown in the following example. Solution: Weight = 16 1
Digit = 13 2
(16*13)+(1*2) = 210
Convert the decimal number 50 into hexadecimal using the division-by-sixteen method.
50/16= 3 remainder 2 (least significant digit [LSD])
3/16= 0 remainder 3 (most significant digit [MSD])
Read the answer from bottom (MSD) to top (LSD): 32
Convert 32 hexadecimal into decimal. Solution: (32)16 = (50)10
Weights 16 1
Digits 3 2
Multiply each weight by its corresponding digit and add the two products together:
(16 * 3) + (1 * 2) = 48 + 2 = 50
Alternatively, you can also convert the decimal number into binary and then convert the binary number into hexadecimal:
50 = 110010
Break the binary number up into groups of four bits, beginning with the LSB:
Pad the group with only two bits...