Ect109Week1Lab1

Submitted by: Submitted by

Views: 268

Words: 627

Pages: 3

Category: Science and Technology

Date Submitted: 02/14/2013 08:40 AM

Report This Essay

Title: Converting binary numbers to decimal

I. OBJECTIVES

In this lab, you will develop an algorithm to convert binary numbers to decimal numbers. Then, apply the algorithm to several binary numbers to obtain their decimal equivalent.

II. PROCEDURE

The process of converting a four bit binary number to its decimal equivalent is demonstrated in the following steps.

Step 1: For each bit position, write down the base, 2, raised to the power of that bit position. For a four bit number, this would be as follows.

23 22 21 20

Step 2: Below each bit position, convert the power of 2 to its decimal value.

23 22 21 20

8 4 2 1

Step 3: Below the decimal weights, write down the binary number that will be converted. For example, use 1101.

23 22 21 20

8 4 2 1

1 1 0 1

Step 4: In each position, multiply the decimal weight times the binary number, i.e. 8 x 1 = 8, 4 x 1 = 4.

8 4 2 1

X X X X

1 1 0 1

= = = =

8 4 0 1

Step 5: Sum the numbers.

8 + 4 + 0 + 1 = 13

Therefore, the four bit number “1101” base 2 (binary) is equivalent to “13” base 10 (decimal).

Problems:

1. Using the process described above, convert the following four bit binary numbers to their decimal equivalent. Record your results.

a. 0011 = 3

b. 1100 = 12

2. Fill in the missing binary or decimal values in the following table.

Binary Bit 3 Binary Bit 2 Binary Bit 1 Binary Bit 0 Decimal

0 0 0 0 0

0 0 0 1 1

0 0 1 0 2

0 1 0 0 4

0 1 1 0 6

1 0 0 0 8

1 0 1 0 10

1 1 0 0 12

1 1 0 1 13

1 1 1 1 15

3. Extend the process described above and convert the following binary numbers to their decimal equivalent. Record your results.

a. 0001 0011 = 19

b. 0101 1001 = 89

4. What is the largest binary number that can be generated in eight binary bits? How did you arrive at this result? 1111 1111 2^7+2^6+2^5+2^4+2^3+2^2+2^1+2^0...

More like this