The Language of Computer

What language do computers use?

BINARY

Decimal Number

  • The prefix “dec-” means 10
  • Our decimal system is based on 10 numbers
  • (0,1,2,3,4,5,6,7,8,9)
  • When counting, using place value, we fill the one's place and then move to the tens place.

Binary Number

  • The prefix “bi” means two.
  • The binary system uses only two numbers - 0 and 1.
  • We count in the binary system the same as in the decimal system by filling in the place values and moving up the place value chart. 

If the decimal system, base 10 has place values 10x the previous place - How do you think the place values for the binary system are determined?

Let's Try It!

A fun activity with Binary

32 16 8 4 2 1

Answer:  2

Binary to Decimal

0 0 0 0 1 0
32 16 8 4 2 1

Answer:  12

Binary to Decimal

0 0 1 1 0 0
8 + 4 = 12
8+4=128 + 4 = 12
32 16 8 4 2 1

Answer:  63

What's the highest number you can calculate from this table ?

1 1 1 1 1 1
32 + 16 + 8 + 4 + 2 + 1 = 63
32+16+8+4+2+1=6332 + 16 + 8 + 4 + 2 + 1 = 63
64 32 16 8 4 2 1

What will you do to convert larger than 63, let's say 70 ?

1 0 0 0 1 1 0
64 + 4 + 2 = 70
64+4+2=7064 + 4 + 2 = 70
70 - 64 = 6
7064=670 - 64 = 6
6 - 4 = 2
64=26 - 4 = 2
2 - 2 = 0
22=02 - 2 = 0

Bits and Bytes

  • Bit - In the binary system, each 0 or 1 is called a bit - short for Binary digIT.
  • Byte - A group of eight bits.

Questions ??

  • Why do we need to know about binary numbers ?
  • How do you convert a negative decimal number to binary?

     

Why do we need to know about binary numbers ?

Binary Activities

https://docs.google.com/document/d/1Im5kUY_L1tcPDcVpU4muUUZJncKbpyZx4Gt0QjBqJvA/edit?usp=sharing

Thank You !