# Base Conversion in number system

We have different number systems for our calculations. Most popular one is decimal system which is of base 10. In digital mathematics we use binary system of base 2. Similarly we use octal system with base 8. Hexadecimal system uses 16 as base. For colour specifications in our HTML codes we use Hex numbers. For example to display blue background color we have to use hex code #0000FF. This is same as Red =0 , Green =0 and blue =255 in decimal system.

We will learn how to convert numbers from one system to other by using JavaScript different functions.

Here is table to give you idea on how the number system changes with different base values.
 Dec Hex Oct Binary 0 0 0 0 1 1 1 1 2 2 2 10 3 3 3 11 4 4 4 100 5 5 5 101 6 6 6 110 7 7 7 111 8 8 10 1000 9 9 11 1001 10 a 12 1010 11 b 13 1011 12 c 14 1100 13 d 15 1101 14 e 16 1110 15 f 17 1111 16 10 20 10000

Subscribe to our YouTube Channel here

## Subscribe

* indicates required
Subscribe to plus2net

plus2net.com