Fundamentals of Data Representation: Bit patterns in a computer

From Wikibooks, open books for an open world
Jump to navigation Jump to search

UNIT 1 - ⇑ Fundamentals of Data Representation ⇑

Bit patterns in a computer Binary number system →

The language that a computer understands is very simple, so simple that it only has 2 different numbers: 1 and 0. This is called Binary. Everything you see on a computer, images, sounds, games, text, videos, spreadsheets, websites etc. Whatever it is, it will be stored as a string of ones and zeroes.

monochrome image of a smiley face
Bit - a standard unit to measure computer memory, consisting of a value that is either 1 or 0
Byte - a standard unit to measure computer memory, usually consisting of 8 bits. e.g. 10101011

Exercise: Bit patterns in a Computer

How do computers store data?


as binary values, using a pattern of 1s and 0s

What sort of data can be stored in binary?


  • Video
  • Sound
  • Picture
  • Text
  • Code
  • Spreadsheet
  • Game
  • etc

What does the following binary string represent: 10011100


This could be anything:

  • sound data
  • picture data
  • text ASCII for œ
  • unsigned integer = 156
  • video data
  • etc

How many bits in a byte?


8, but it is originally the amount of bits used to represent a character

How many bits in 7 bytes?


7 * 8 = 56