Computers Use Binary

  • The binary number system has 2 numbers (0 and 1)

    Binary Numbers

  • a number system that uses two digits
  • 1: an electrical signal in computer being on
  • 0: an electrical signal in computer being off
  • Binary digit: the smallest unit of data in computing
  • Byte: group of 8 bits

    Binary Numbers and the Physical Processes of a Computer

  • Circuits in a computer’s processor are made up of billions of transistors
  • Digits 0 and 1 used in binary reflect the electrical signal being on and off
  • All software, music, documents, and any other information that is processed by a computer is stored in sequences of binary
  • The way a binary sequence is used is interpreted depends on how it will be used
  • A byte of information like 0100 1001 is used to represent instructions to the computer

    Binary Numbers Represent Instructions

  • Important to remember - the 1s and 0s can represent ANYTHING

    Digital Data and Abstractions

  • At lowest level, bits represent all digital data
  • Abstraction reduces complexity and allows us to focus on the main idea or larger problem
  • Analog: a mechanism, device, or technology that represents data by measurement of a continuous physical variable
  • The use of digital data to approximate real world analog data is an example of abstraction

    Integers Are Represented by a Fixed Number of Bits

  • All data is represented by 1s and 0s arranged in groups called bytes a) This includes integers - whole numbers, even and odd, including 0
  • Integers are represented in computers by a fixed number of bits a) Examples:
    1. Some programming languages store data values in up to 32 bits (or 4 bytes)
    2. 4 bytes can represent 2^32 different values or a little over 4 billion different values total

      Overflow Error

  • If a program encounters a calculation that requires a number larger than what it’s memory will allow to be stored, this can result an overflow error

    Round-off Error

  • Programming languages can have problems with real numbers like pi

    Computer’s Available Memory

  • Ideal situation: the range of numbers a computer can work with would only be limited by the computer’s available memory
  • Real world: this is not always possible a) If a number stretches towards infinity, it would require an infinite amount of computer memory in order to store and calculate