# Numbers for Digital System

By | May 31, 2021

This article describes the number system and the conversion process between number systems. There are four number systems that can be used : decimal, binary, octal, and hexadecimal. The decimal system is certainly familiar because it is always used every day. For digital techniques used binary and hexadecimal number systems.

### Decimal Numbers

Decimal numbers consist of 10 numeric symbols :  0, 1, 2, 3, 4, 5, 6, 7, 8, 9; The decimal system is often called the base 10 number. Because it consists of 10 digits. In the application, the value of a decimal number is determined by its position in the data as given in table 1 below

Table 1 : The value of the decimal number in its position

 103 102 101 100 10-1 10-2 10-3 = 1000 = 100 = 10 = 1 . = 0.1 = 0.01 = 0.001 MSD Decimal pont LSD

MSD = Most Significant Digit
LSD  = Least Significant Digit

Examples:

123

1 = 100

2 = 20

3 = 10

### Binary Numbers

In a binary system, there are two digit values 0 and 1, so it is often called the base number two. With these two values ​​it can be used to represent all quantifiable quantities that can be expressed in decimal form or other number systems. The bit value is determined by the bit position in a binary data series, as given in Table 2 and the 4-bit Binary System is given in Table 3 below

Table 2 : The Value of bit positions in binary

 23 22 21 20 2-1 2-2 2-3 = 8 = 4 = 2 = 1 . = 1/2 = 1/4 = 1/8 MSB Binary Point LSB

MSB = Most Significant Bit
LSB  = Least Significant Bit

Table 3  : 4 bit binary system

 23 22 21 20 Decimal 0 0 0 0 0 0 0 0 1 1 0 0 1 0 2 0 0 1 1 3 0 1 0 0 4 0 1 0 1 5 0 1 1 0 6 0 1 1 1 7 1 0 0 0 8 1 0 0 1 9 1 0 1 0 10 (A) 1 0 1 1 11 (B) 1 1 0 0 12 (C) 1 1 0 1 13 (D) 1 1 1 0 14 (E) 1 1 1 1 15 (F)

### Converting Binary to Decimal

Binary numbers can be converted to decimal form by summing the 1 bit values ​​based on their position as given in Fig.

Examples:

1 1 0 1 1 2 (binary)

24+23+ 0 + 21+20 = 16 + 8 + 0 + 2 + 1

= 2710 (decimal)

and

1 0 1 1 0 1 0 1 2 (binary)

27+ 0 + 25+24+ 0 + 22+ 0 + 20 = 128 + 0 + 32 + 16 + 0 + 4 + 0 + 1

= 18110 (decimal)

### Decimal to Binary Conversion

There are 2 methods:

(A) Reverse of the Binary to Decimal method

45 10 = 32 + 0 + 8 + 4 +0 + 1

= 25+ 0 + 23+22+ 0 + 20

= 1 0 1 1 0 12

(B) repeated division

This method uses division by 2 repeatedly, the result is read from the result of the last division.

Example: conversion 2510 to binary 25/2

= 12 remainder 1 1 (LSB) 12/2

= 6 remainder 0 0

6/2 = 3 remainder 0 0

3/2 = 1 remainder 1 1

2.4

1/2 = 0 remainder 1 1 (MSB)

Result 2510 = 110012

### Octal Numbers

Octal numbers are often called base 8 numbers because they have 8 digits, namely: 0,1,2,3,4,5,6,7 with values ​​based on digit positions as given in Table.4.

Table 4 Value of octal number

 83 82 81 80 8-1 8-2 8-3 = 512 = 64 = 8 = 1 . = 1/8 = 1/64 = 1/1212 MSD Octal Point LSD

### Convert Octal to Decimal

Example: 24.68 = (……..)10

= 2 x (81) + 4 x (80) + 6 x (8-1)

= 20.7510

Converting Binary to Octal

 Octal Digits 0 1 2 3 4 5 6 7 Binary Equivalent 000 001 010 011 100 101 110 111

To convert a binary number to octal, each octal digit is given as a 3 bit binary number.

Example: 100 111 0102 = ……….8

= (100) (111) (010)

= 4 7 28

2.5

### Octal to Binary Conversion

The method is to use repeated division. This method divides the decimal number by 8 repeatedly and the result is read from the last division.

Example: Conversion says a 17710 to Octal and binary form

Convert to octal:

177/8 = 22 remainder 1 1 (LSB) 22/8 =

2 remainder 6 6

= 0 remainder 2 2 (MSB)

2/8Result 17710 = 2618

Convert to Binary = 010 110 0012

The hexadecimal number system is a number system with 15 numeric symbols so it is often called the base 16 number system, namely: 0 to plus the letters A, B, C, D, E, and F.The digit position values ​​are given in Table 6. .

Table 6. The position value of the hexadecimal number

 163 162 161 160 16-1 16-2 16-3 = 4096 = 256 = 16 = 1 . = 1/16 = 1/256 = 1/4096 MSD Hex Point LSD

Example:

2AF16 = ……10.

2.6

= 2 x (162) + 10 x (161) + 15 x (160)

= 68710

Repeating divisor: Convert decimal to hexadecimal

The method is the same in the decimal system but the divisor is 16. Example:

Convert 37810 to hexadecimal and binary:

378/16 = 23+ remainder 10 A (LSB) 23/16

= 1 + remainder 7 7

1/16 = 0 + remainder 1 1 (MSB)

Result 37810 = 17A8

Conversion to binary = 0001 0111 1010

Each hexadecimal digit consists of 4 bits of binary digits as given in Table 7.

Table 7. Binary equivalent of the hexadecimal number

 Hexadecimal 0 1 2 3 4 5 6 7 Binary equivalent 0000 0001 0010 0011 0100 0101 0110 0111 Hexadecimal 8 9 A (10) B (11) C (12) D (13) E (14) F (15) ) Binary Equivalent 1000 1001 1010 1011 1100 1101 1110 1111

Example:

1011 0010 11112 = …. 16

2.7

= (1011) (0010) (1111)2

= B 2 F16

Example:

123E16 = …… 2

= 10001 0010 0011 11102

Steps:

1) Convert Hexadecimal to Binary form.

2) Arrange binary numbers in 3 bit form starting from LSB.

Example.

Convert 5A816 to Octal

Convert to the binary form

45616 = 0100 0101 0110 (binary)

Create in a 3 bit group.

Obtained = 010 001 010 110

= 2 1 2 38

### Conclusion

1. There are 4 number systems : binary, octal, decimal, and hexa decimal.
2. The four numbers can be converted to one another.
3. Digital techniques using binary numbers