The Binary Number System

Binary sequences  — sequences of 0’s and 1’s — are used to represent all computer data.

  • Numbers
  • Letters and text.
  • Images.
  • Machine language instructions.
  • Sounds and video.
  • Every kind of data you find on a computer.

Binary system is similar to the decimal system.

  • Both are positional number systems.
    • 542 is 500 + 40 + 2.

Decimal is a base-10 system:

  • 10 digits, 0 through 9
  • Place values are powers of 10: 1’s, 10’s, 100’s, 1000’s, etc.
  • Each place is previous place times 10
  • Both are positional number systems.
    • 101 is 4 + 0 + 1 = 5

Binary is a base-2 system:

  • 2 digits, 0 through 1
  • Place values are powers of 2
    • 1s, 2s, 4s, 8s, 16s, etc.
    • Each place is previous place times 2

Hardware Abstraction Layers: Binary data is processed by physical layers of hardware

Physical electronic circuits: At the lowest level, physicists and electrical engineers develop materials and design and build electronic circuits that are composed of transistors, the fundamental building block of electronic devices.

Gates and flip flops: Computer scientists and electrical engineers combine basic circuits into basic computational elements, such as AND gates and S/R flip flops.

Integrated Circuits (ICs): Electrical and computer engineers combine low-level elements into complex integrated circuits or computer chips.

Abstraction: A general representation of something.

1. Figure out what decimal value is represented by the following binary number 0011 1010 0011

= 931

2. Represent the decimal value 517 as a binary number.

= 1000000101

3. The binary number system is base 2 and has 2 digits. The decimal number system is base 10 and has 10 digits. The octal system is base 8. How many digits does it have? What are they, starting at 0?

The octal system has 8 digits: 0,1,2,3,4,5,6,7

4. Suppose the number 523 is a base-8 octal number. What would its value be in decimal? In binary?

The octal value 523 is 339 in decimal. In binary it would be 1000001011.