# Introduction

﻿
In our everyday lives, we use the decimal number system known as base 10. This is an example of a positional number system. Computer science and engineering use other systems, such as binary and hexadecimal numbers, for various purposes.
﻿
Binary is a base-2 numerical system that uses only two symbols, 0 and 1, to represent numbers. Binary is used in electronic computer systems because they can be effectively mapped onto real electronic 'switches', which form the bases for modern computation.
Hexadecimal is a base-16 numerical system that uses the numbers 0 to 9 and the characters A to F to represent the values 10-15. Hexadecimal is used to store large numbers with fewer characters than binary and decimal, making it desirable in particular computational processes.

# Converter

﻿
This calculator is designed to convert decimal numbers from 0 to 1023 into binary equivalents. Since the calculator uses a 10-bit representation, the highest hexadecimal value that can be inputted is 3FF.

﻿
﻿
Hex Value
:3F0
﻿

﻿
﻿
Decimal Value
:1008.0
﻿

### Equivalent Binary Value

﻿
﻿
Binary Value
:1111110000
﻿
﻿
Understanding how to convert between these different number systems is fundamental to electronic and software design. So keep reading to find out how!

# Explanation

So how do we convert between the different systems?
To understand how decimal, binary and hexadecimal values it is pivotal to understand the underlying principles behind their notation.
Take the decimal system, for example, specifically the number 2304. If we break this down into its powers of 10, we can observe each digit as a weighted value of a 10th power.
﻿
We can perform this same step with each digit in a binary number, as each digit represents a power of 2. If we take a binary number, say 100100000000, we can break it down into its constituent parts and better understand how binary numbers function.
﻿
As is the case with decimal and binary, this base-16 number system essentially entails that each digit or character corresponds with a power of 16. If we take a hexadecimal number, say 900, we can break it down again into a set of constituent components.
﻿
Note!
1. Hexadecimal numbers can be tricky, as A-F represents 10 through 15.
2. The following table will help with any conversion between the number systems.
﻿

Converting from hexadecimal to binary can be achieved using the above table. However, for larger numbers, this proves more difficult, and thus we will highlight a simple method for achieving conversion.
This method will involve converting from hexadecimal to decimal, then from decimal to binary. Let us use an example and explain the process simultaneously. Let's take the hexadecimal number 2D4.
1. First, we must convert hexadecimal to decimal:
﻿
1. Next, we must employ the following method to convert to binary:
We will continually divide the decimal number by two until we reach 0, using the remainder to construct the binary number with the first remainder as the least significant bit and the last remainder as the most significant bit.
﻿
Now we have our equivalent binary number: 1011 0001 00

### Details on the conversion

The calculator at the top of this page is designed to convert decimal numbers from 0 to 1023 into binary equivalents. Since the calculator uses a 10-bit representation, the highest hexadecimal value that can be inputted is 3FF.
To convert a decimal value that requires less than 10 bits (less than 512), you can find the last non-zero bit when reading the binary representation vertically from "Remainder_b1" to "Remainder_b10." This last non-zero bit will be the leading 1 in the binary representation.
It's important to note that the binary numbers 01001 and 1001 actually represent the same unsigned binary value. The leading 0 in the former case is discarded during the conversion process.
By following these steps, using this calculator, you can accurately convert decimal values to their binary equivalents!
﻿
Here's a detailed breakdown of how this works (control the hex input from the top of the page).

﻿
﻿
Hex Value1
:3F0
﻿

﻿
﻿
Decimal value1
:1,008.00
﻿

### 10-Bit Binary Value

﻿
﻿
Binary value1
:1,111,110,000.00
﻿
﻿

## Binary

﻿
 504​ 252​ 126​ 63​ 31.5​ 15.5​ 7.5​ 3.5​ 1.5​ 0.5​
﻿
 504​ 252​ 126​ 63​ 31​ 15​ 7​ 3​ 1​ 0​
﻿
 0​ 0​ 0​ 0​ 1​ 1​ 1​ 1​ 1​ 1​
﻿
﻿
Raw Binary
:1111110000
﻿
﻿
﻿
Clean Binary
:1111110000
﻿

# Conclusion

In this article, we have covered the fundamental principles behind decimal (base 10), binary (base 2) and hexadecimal (base 16) positional number systems.
We highlighted how to convert from binary and hexadecimal to a decimal number as well as conversion from a hexadecimal number to a binary number.
Developing a concrete understanding of these number systems as well as how they relate to each other is a foundational building block for building and developing modern digital systems.