# Number System

Hey Guys, Today I’m back with another article on Basic Electronics. This one might be a bit long as it is a whole topic to be covered in a single one to keep the coordination, I’ll try to complete it in a single one. Today we are going to discuss Number System and Boolean Logic. These two topic seems a bit tough and complicated but not if understand carefully. To keep it short, let’s begin!!!

## Number System:

We all are familiar with number 0 to 9. Yes, these 10 numbers which we use in our daily life for day to day operation. These 10 numbers are a Decimal Number System. This number system is used to perform all Arithmetic operation and calculations, but can be different for one system to others. As we all know that a machine understands either 0 or 1 which are binary digits also Machine Language. Now let’s know about some number system.

### BINARY NUMBER SYSTEM:

This system consists of only two numbers, either 0 or 1. Often called as binary numbers/digits or machine language. All other languages are converted into binary to perform operation on a machine. Also, to show alphabets like j, k, l, m, n, o, p; which is high level; language also needs to be converted into binary to be understood by machine.

### OCTAL NUMBER SYSTEM:

This number system consists of 8 digits, from 0-7. These eight digits in computer application sectors. These are used to represent data in some easy format from binary. It’ seems not be good, but yes it can be used to represent data in some easy way than a large string of binary numbers. Conversion from binary to octal is done by making truth table for it also if concerting data from hexadecimal to octal also done by using truth table.

### DECIMAL NUMBER SYSTEM:

This is the most common number system used in daily life and consists of 0-9. This seems to be good when represent in human-readable form, as it can be understood easily. Conversion from different number system are either done in by convention or by using the truth table.

This the most complicated number system you will learn. Don’t worry, it is rather quite simple to understand and perform operations. Conversion from a different number system to this seems to be easy using a truth table, or by convention it may be rather hard. I prefer using truth table for doing so.

Now, lest discuss their conversions from one number system to another.

## CONVERSIONS:

### BINARY TO OTHER NUMBER SYSTEM:

Let’s take a binary number 11010011 now lets see how to convert it to other number system

#### OCTAL

To create a truth table, first take umber of inputs like 4 then raise it to the power 2 like 24.

Here we need 8 digits means 2x=8   So, x=3 hence we make 3 columns or inputs.

OCTAL TRUTH TABLE
A B C OCTAL NUMBER
0 0 0 0
0 0 1 1
0 1 0 2
0 1 1 3
1 0 0 4
1 0 1 5
1 1 0 6
1 1 1 7

Now use the above truth table to convert this binary number to octal

First group binary number in number to bits of number system. Like in octal there are three A, B, C so, 11 010 011. You can see that the 3rd pair is incomplete. So, to complete it, just put an additional 0 in front of it. You can do this in every conversion using truth table if you find the pair incomplete, but can only add 0. Hence, final pair becomes 011 010 011.

Now just look up to the truth table and place the digits as in the order of pair like:

011 –> 3

010 –> 2

011 –> 3

so Final Number of 11010011 in octal is 323.

#### DECIMAL

For BINARY to DECIMAL conversion you have to make such table or if you can calculate then do like this.

 BINARY 1 1 0 1 0 0 1 1 TO OCTAL 1 × 27 1 × 26 0 × 25 1 × 24 0 × 23 0 × 22 1 × 21 1 × 20 RESULT 128 64 0 16 0 0 2 1

Starting from end digit, start multiplying each digit with the increasing exponent power of 2 as shown above. Now add all the resulting values to form the resulting number, like 128+64+16+2+1=211. Hence, the resulting number 11010011 in decimal is 211.

For BINARY to HEX conversion first group the binary number into the pair of four like 1101 0011.

A B C D HEXADECIMAL NUMBER
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 A
1 0 1 1 B
1 1 0 0 C
1 1 0 1 D
1 1 1 0 E
1 1 1 1 F

Now from above table put the value of binary group like

1101 –> D

0011 –> 3

So the final Hexadecimal number from binary 11010011 is D3.

### OCTAL TO OTHER NUMBER SYSTEM

#### BINARY

Same using truth table as from binary to octal. Just reverse the procedure and from each octal value place the corresponding binary value.

#### DECIMAL

Let’s take an octal number 2135 Noe make table like below and apply same procedure as from binary to decimal but raise the exponent power of 8 in place of 2.

 OCTAL 2 1 3 5 TO BINARY 2 × 83 1 × 82 3 × 81 5 × 80 RESULT 1024 64 24 5

Now add all the value to get desired conversion of octal number 2135 to 1117 in decimal.

Best way is to use OCTAL & HEXADECIMAL truth table for conversions like:

2135 –> 010 001 011 101 in group of three for octal number

0100 0101 1101 –> 45D in group of 4 for hexadecimal system

### DECIMAL TO OTHER NUMBER SYSTEM

#### BINARY

Let’s take a decimal number like 546. Divide the decimal number with base 2 like this.

 2 546 2 273 0          ^ 2 136 1           | 2 68 0          | 2 34 0          | 2 17 0          | 2 8 1           | 2 4 0          | 2 2 0          | 2 1 0          | 2 0 1           |

Now write the number in order from bottom to top like 1000100010 which is 546 in decimal number system.

#### OCTAL

For octal number system you have to do the same as from decimal to binary, but this time divide by 8 and remainder will be between 0-7. Like 546 will be 1042 in Hexadecimal.

For converting Decimal to Hexadecimal you have to do same as from decimal to octal but in this case divide by 16 and put remainder in reverse order like in above cases. So 546 in hexadecimal is 222.

### HEXADECIMAL TO OTHER NUMBER SYSTEM

#### BINARY

For converting Hexadecimal to Binary, you have to use Hexadecimal truth table which is mentioned above. For this take each hexadecimal number and in its place put its 4 digit corresponding binary conversion. Like in 24D :

2 –> 0010

4 –> 0100

D –> 1101

So. the resulting Binary conversion of 24D Hexadecimal is 001001001101 or 1001001101.

#### OCTAL

For converting Hexadecimal number system from hexadecimal to octal, you’ve to use both Truth Table Octal and Hexadecimal. Just reverse the process used in conversion from octal to hexadecimal. For example: 24D

2 4 D  —–> 0010 0100 1101   Hexadecimal to Binary (Binary number in group of 4)

001 001 001 101  —–> 1 1 1 5   Binary to Octal (Binary number in group of 3)

#### DECIMAL

For converting Hexadecimal to Decimal, use the convention method :

 HEXADECIMAL 2 4 D = 13 TO DECIMAL 2 × 162 4 × 161 13 × 160 RESULT 512 64 13

Now add all value to make the final number, i.e., 589. So 24D Hex number is 589 in decimal.

With this we have completed all the main number systems and conversion for rest visit Boolean algebra and Gates and other Logic Circuits. I hope you like this one and for any other conversion comment me below.