Decimal to Binary Conversion Press any key to continue…

Post on 23-Dec-2015

221 views 0 download

Transcript of Decimal to Binary Conversion Press any key to continue…

Decimal

to

Binary Conversion

Press any key to continue…

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1

1

Use the chart to record the subtraction

Press any key to continue…

Method 1 - subtraction

To convert the decimal number 189 to binary you must subtract the highest number possible first. Place a 1 in the chart for any number you subtract.

189

-128

61

Cannot subtract a 64

61

- 32

29

29

- 16

13

13

- 8

5

1 10 1 1 10

5

- 4

1

1

- 1

0

Cannot subtract a 2

= 189

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1

0

Use the chart to record the subtraction

Press any key to continue…

Try another number using Method 1 - subtraction

To convert the decimal number 75 to binary you must subtract the highest number possible first. Place a 1 in the chart for any number you subtract.

Cannot subtract a 128

75

- 64

11

Cannot subtract a 32

Cannot subtract a 16

11

- 8

3

0 01 1 0 11

Cannot subtract a 4

1

- 1

0

3

- 2

1

= 75

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1

1

Press any key to continue…

On a piece of paper convert the number 242 using Method 1 – subtraction. Press any key when you have an answer.

To convert the decimal number 242 to binary you must subtract the highest number possible first. Place a 1 in the chart for any number you subtract.

242

- 128

114

114

- 64

50

50

- 32

18

18

- 16

2

Cannot subtract an 8

1 11 0 0 01

Cannot subtract a 4

2

- 2

0

= 242

Press any key to continue…

Method 2 - division

Use the chart to record the division

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1

To convert the decimal number 189 to binary you must divide the number by 2. Starting from the right, place a 1 if there is a remainder or a 0 if no remainder.

189 / 2 = 94 r 1 94 / 2 = 47 r 0 47 / 2 = 23 r 1 23 / 2 = 11 r 1 11 / 2 = 5 r 1 5 / 2 = 2 r 1 2 / 2 = 1 r 0

01101 1 1 1 = 189

1 / 2 = cannot divide further - carry the 1

Press any key to continue…

Method 2 - division

Use the chart to record the division

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1

To convert the decimal number 75 to binary you must divide the number by 2. Starting from the right, place a 1 if there is a remainder or a 0 if no remainder.

75 / 2 = 37 r 1 37 / 2 = 18 r 1 18 / 2 = 9 r 0 9 / 2 = 4 r 1 4 / 2 = 2 r 0 2 / 2 = 1 r 0

10010 1 0 1 = 75

1 / 2 = cannot divide further - carry the 1 Fill in to make 8 bits with 0

Press any key to continue…

Method 2 - division

Use the chart to record the division

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1

To convert the decimal number 242 to binary you must divide the number by 2. Starting from the right, place a 1 if there is a remainder or a 0 if no remainder.

242 / 2 = 121 r 0121 / 2 = 60 r 1 60 / 2 = 30 r 0 30 / 2 = 15 r 0 15 / 2 = 7 r 1 7 / 2 = 3 r 1 3 / 2 = 1 r 1 1 / 2 = cannot divide further - carry the 1

11111 0 0 0 = 242

The End