13
What is binary? Why do computers use it?

What is binary and why do we use it?

Embed Size (px)

DESCRIPTION

Introduction to binary numbers and simple calculator using Excel.

Citation preview

Page 1: What is binary and why do we use it?

What is binary?

Why do computers use it?

Page 2: What is binary and why do we use it?

The first computer was NOT a binary machine

.. but that was a mistake

Page 3: What is binary and why do we use it?

Which is clearer?

Page 4: What is binary and why do we use it?

Which is clearer?

Page 5: What is binary and why do we use it?

Confident?

Page 6: What is binary and why do we use it?

recursive

89635839

010011010

Page 7: What is binary and why do we use it?

How binary works

To convert to decimal, just add them up!0*128 + 1*64 + 0*32 + 1*16 + 1*8 + 1*4 + 1*2 + 0*1

0

Units (1s)

1

2s

1

4s

1

8s

1

16s

0

32s

1

64s

0

128s

Just two numbers, 0 and 1 Place matters

Page 8: What is binary and why do we use it?

Can you do it?

Decimal number 128 64 32 16 8 4 2 1

0 0 0 0 0 1 1 0

0 1 0 0 0 1 1 1

0 0 0 0 0 0 0 0

0 1 0 1 0 1 0 1

1 0 1 1 1 1 0 1

0 0 1 0 1 0 1 1

1 1 1 1 1 1 1 1

Page 9: What is binary and why do we use it?

Can you do it the other way?

Decimal number 128 64 32 16 8 4 2 1

6

7

15

23

62

127

96

Page 10: What is binary and why do we use it?

What’s the bottom of Excel?

Page 11: What is binary and why do we use it?

Excel binary to decimal

Use eight cells for the binary number

Put the magic numbers below: 128,64,32,16,8,4,2,1 Multiply * Add the results =sum() Make it look good

Can you do it the other way round?

Page 12: What is binary and why do we use it?

Excel decimal to binary

Use =div() to divide by two Keep doing it Use =mod() to find the remainder That gives you the binary digits

Decimal number here=int(/2)

=mod(,2)

Page 13: What is binary and why do we use it?

Can you ….

Write out a binary number? Convert binary to decimal? Convert decimal to binary? Use multiply in a spreadsheet? Drag-Copy in a spreadsheet? Use =SUM() in a spreadsheet? Use =INT() in a spreadsheet? Use =MOD() in a spreadsheet?