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.
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
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
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
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
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
Reading the remainders from bottom to top, 13 in decimal is 1101 in binary.
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
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
So, 1101 in binary is 1A in hexadecimal.