MCS-012 Computer Organisation and Assembly Language Programming

First year, Semester 1

Number Systems : A look Back

Number systems are methods for representing and working with numbers. The most common number systems used in computing are decimal, binary, octal, and hexadecimal. Each system has its own base and symbols for representing values.

Decimal Numbers

The decimal number system is the standard system for denoting integer and non-integer numbers. It is also known as the base-10 system because it is based on 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. For example, the number 345 in decimal represents 3×102+4×101+5×1003 \times 10^2 + 4 \times 10^1 + 5 \times 10^03×102+4×101+5×100.

Binary Numbers

The binary number system is used internally by almost all modern computers and computer-based devices. It is a base-2 system, meaning it uses only two symbols: 0 and 1. Each digit in a binary number is called a bit. For example, the binary number 101 represents 1×22+0×21+1×201 \times 2^2 + 0 \times 2^1 + 1 \times 2^01×22+0×21+1×20, which equals 5 in decimal.

Octal Numbers

The octal number system is a base-8 system, using digits from 0 to 7. It is sometimes used in computing as a more compact representation of binary numbers, since each octal digit represents three binary digits. For example, the octal number 17 represents 1×81+7×801 \times 8^1 + 7 \times 8^01×81+7×80, which equals 15 in decimal.

Hexadecimal Numbers

The hexadecimal number system is a base-16 system, using sixteen distinct symbols: 0-9 to represent values zero to nine, and A-F to represent values ten to fifteen. Hexadecimal is often used in computing as a human-friendly representation of binary-coded values. For example, the hexadecimal number 1A represents 1×161+A×1601 \times 16^1 + A \times 16^01×161+A×160 (where A = 10), which equals 26 in decimal.


Conversion of Decimal Number to Binary Number

To convert a decimal number to binary, repeatedly divide the number by 2 and record the remainder. Read the remainders from bottom to top.

Example: Convert 13 to binary

  1. 13 ÷ 2 = 6 remainder 1
  2. 6 ÷ 2 = 3 remainder 0
  3. 3 ÷ 2 = 1 remainder 1
  4. 1 ÷ 2 = 0 remainder 1

Reading the remainders from bottom to top, 13 in decimal is 1101 in binary.


Conversion of Binary to Octal and Hexadecimal

Binary to Octal: Group the binary digits into sets of three, starting from the right. Convert each set to its equivalent octal digit.

Example: Convert 1101 (binary) to octal

  1. Group: 1 101 (add leading zeros if needed: 001 101)
  2. Convert each group: 001 = 1, 101 = 5

So, 1101 in binary is 15 in octal.

Binary to Hexadecimal: Group the binary digits into sets of four, starting from the right. Convert each set to its equivalent hexadecimal digit.

Example: Convert 1101 (binary) to hexadecimal

  1. Group: 1101 (add leading zeros if needed: 0001 1010)
  2. Convert each group: 0001 = 1, 1010 = A

So, 1101 in binary is 1A in hexadecimal.

Report an issue

Reporting: Number Systems : A look Back (topic)

Related Posts