Representation of Numbers

Representation of Numbers

Binary Numbers

  • A binary system contains only two digits, 0 and 1.
  • A binary digit is known as a bit, which is the smallest unit of data in a computer.
  • Eight bits together form 1 byte.
  • Converting a binary number to decimal involves multiplying each bit by two to the power of its position, and then summing these values.

Hexadecimal Numbers

  • Hexadecimal is a base-16 numeral system.
  • It uses sixteen distinct symbols: 0-9 and A-F, where A represents 10 and F represents 15.
  • Hexadecimal numbers are used in computing due to their concise representation of large binary numbers.
  • To convert from binary to hexadecimal, split the binary number into group of 4 bits starting from the right. Each group then represents one hexadecimal digit.

Denary Numbers

  • Denary (or decimal) is a base-10 numeral system.
  • It uses ten symbols: 0-9.
  • The decimal system is most commonly used for counting and calculations in everyday life.

Data Storage and Measurement

  • Data storage in computer systems is measured using bytes.
  • One kilobyte (KB) is 1024 bytes, one megabyte (MB) is 1024 kilobytes, and so on.
  • The sequence of data measurement goes: byte, kilobyte, megabyte, gigabyte, terabyte, petabyte, exabyte, zettabyte, and yottabyte.
  • A byte is the standard unit of measurement for memory capacity and signifies the amount of data one byte can hold.

Number Overflow

  • In computing, number overflow can occur when a calculation results in a number that is too large for the allocated storage space.
  • The resulting value after an overflow might be drastically different from the expected result.
  • An understanding of binary and hexadecimal representations is critical in diagnosing and addressing overflow errors.