We use decimal number system in every day life to represent numbers, with 10 different symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. In computer science, numbers are represented with different number systems.

Binary (Bit)

Computers store data in binary (1s and 0s), because computer memory is created from memory elements that are either ON or OFF, representing 1 or 0. These binary digits, or bits are usually arranged in groups of 8 called bytes (8 bits = 1 byte).

Instructions

Computer programs are represented as set of instructions executed by the Central Processing Unit (CPU). Programs can create machine instructions, store them in the memory and then get the CPU to execute them.

Instructions are represented in bits and stored in a sequence of bytes, e.g. 01100100 10001100 The example might be broken down as: 0110 code for “add” instruction 0100 address 4 1000 address 8 1100 address 12 And those are the machine language.

Hexadecimal (Hex)

Since binary numbers take up more space than decimal (e.g. 9384 is 10010010101000 in binary). One way to save space is to use another number base, other than 2 or 10, to represent the number. If we choose a number for the base that is also a power of two it makes it easier to convert each digit into binary. The most common base in computing is base 16, hexadecimal or hex. In hexadecimal, it requires 16 different symbols, from 0 to 9 and A to F.

Conversion between systems

No matter what number system is used, it has to be converted to binary to be understood by the computer. Find more on Number System Conversion.


Operating_systemINFO1112Data_representationNumber_system_conversionBinaryHexadecimalHexBit