The Binary Number System

Positional Number Systems

There are three number systems that are the most relevant to computer science:

  • decimal (10 symbols): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

  • binary (2 symbols): 0, 1

  • hexadecimal (16 symbol): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

They are all what are called positional number systems. Positional number systems follow the same set of rules for how to count and perform computations, such as addition and subtraction. They just have a different number of symbols.

The number of symbols determines when you shift over to the next place value.

Positional Number System Rules

  • The number system has a base, which specifies how many symbols are in the system.

  • The base is what determines the worth of each place value.

  • Each place value is worth (base times) more than the previous place value as you move from the right to the left.

Why are Binary and Hexadecimal Important in Computer Science?

Binary is important because computers represent all data as numbers and a computer can easily represent a binary number with a series of on and off states with electrical signals.

Using binary, eight switches can represent a number as high as 255. Using 32 switches can represent a number as high 4,294,967,295.

Hexadecimal is important because it is a more compact notation to represent binary numbers. Every four binary digits equals a single hexadecimal digit.

Resources

Last updated