Number Theory: Number bases

Number Theory: Number bases

Understanding Number Bases

  • A number base or radix is the number of unique digits, including zero, used to represent numbers in a positional numeral system.
  • The base we most commonly use is base 10 or decimal, but other bases like binary (base 2), octal (base 8), and hexadecimal (base 16) are also frequently used in areas such as computer science and digital electronics.

Base Conversion

  • Conversion between different number bases is an important skill in number theory and digital systems.
  • To convert from base 10 to another base, the base must first be divided into the number and the remainder noted. This process is then repeated with the quotient until there is nothing left to divide, and the remainders constitute the digits of the equivalent number in the new base, with the last remainder being the leftmost digit.
  • To convert from one base to another, or a base other than 10, it is often simplest to first convert to base 10 and then to the desired base.

Binary, Octal, and Hexadecimal Systems

  • The binary system (base 2) uses only two digits, 0 and 1. It is the fundamental language of computers and digital systems.
  • The octal system (base 8) has eight digits (0-7) and is sometimes used in digital systems because it’s a shorthand form of binary, with each digit representing three binary digits.
  • The hexadecimal system (base 16) uses sixteen digits, with the digits beyond 9 represented by the letters A-F. It is used extensively in computer systems because it’s an even more compact representation than octal, with each digit representing four binary digits.

Operations in Different Bases

  • Arithmetic operations such as addition, subtraction, multiplication, and division can be performed in any base.
  • The process for these operations in other bases is analogous to that in base 10, but you carry or borrow the value of the base instead of 10.

Use of Bases in Computer Science and Digital Electronics

  • Mastery of number theory, and specifically different number bases, is fundamentally important for understanding the operation of computer systems and digital electronics.
  • Converting between decimal, binary, octal, and hexadecimal is a key skill for computer scientists and engineers.