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.

Recommended Procedures

Task 1: Convert Decimal Number into Binary

Procedure

1. Convert the decimal number 125 into binary. Use the division-by-two method shown in the following example below.

2. Convert your binary result back into decimal to prove your answer is correct. This is also shown in the following example.

Example:

Convert the decimal number 50 into binary using the division-by-two method. Convert the binary result back into decimal.

Solution:

50/2= 25

25/2= 12 remainder 1

12/2= 6 remainder 0

6/2= 3 remainder 0

3/2= 1 remainder 1

1/2= 0 remainder 1 (most significant bit [MSB])

Read the answer from bottom (MSB) to top least significant bit (LSB): 110010

Convert 110010 binary into decimal.

Weights 32 16 8 4 2 1

Bits 1 1 0 0 1 0

Adding the weights whose bits are 1: 32 + 16 + 2 = 50

Solution:

125/2=62 remainder 1

62/2=31 remainder 0

31/2=15 remainder 1

15/2=7 remainder 1

7/2=3 remainder 1

3/2=1 remainder 1

1/2= 0 remainder 1

Reading the answer from bottom to top =1111101

Weights 64 32 16 8 4 2 1

Bits 1 1 1 1 1 0 1

Adding the weights whose bits are 1: 64+32+16+8+4+1=125

Task 2: Convert Binary Number into Decimal

Procedure

1. Convert the binary number 10101101 into decimal. Use the method of adding weights, as shown in the example, from Task 1.

2. Use the Windows calculator to prove your answer is correct. This process is shown in the following example.

Example:

Use the Windows calculator to prove that the binary number 110010 equals 50 decimal.

Solution:

First, start the Windows calculator by clicking Start and then clicking Run. Enter calc in the Open