Decimal, Binary, and Hexadecimal Number Systems
Humans have been using the base 10 (decimal) number system since we began using our fingers for counting. However, any number greater than 2 can effectively be used as the basis for a number and counting system. In fact, electronic computers use the base 2 (binary) number system at their most basic level. The binary system naturally corresponds to the ON/OFF or TRUE/FALSE nature of their electronic circuits and magnetic components. In the binary system, numbers are constructed using the two digits, 0 and 1, and each of these digits represents one bit of data. Other number systems are the base 8 (octal) and base 16 (hexadecimal) number systems. We will discuss the base 2 and base 16 systems and their correspondence to the base 10 system.
Let’s begin with the base 10 or decimal system. For such a system, we need ten unique numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. All numbers higher than this, and fractions less than 1, can be represented as powers of 10, as shown in Table 5.
|Table 5. Decimal Number System|
The binary system follows the same rule for the places, except each place is one power of 2 greater than the place on its right, as shown in Table 6.
|Table 6. Binary Number System|
For the hexadecimal or base 16 system, we need symbols to represent the numbers from 10 to 15. For this system, A is used for 10, B for 11, C for 12, C for 13, D for 14, and E for 15.
|Table 7. Hexadecimal Number System|
Table 8 shows a comparison of the decimal, binary, and hexadecimal equivalents for the first 16 numbers plus 32 and 64. Use the rules above to understand the correspondences in the table.
|Table 8. Correspondence Between Decimal, Binary, and Hexadecimal Numbers|
10 in base 2 is 10102. The subscript indicates base 2. Another way to signify the base 2 number system is to put a small b (for binary) to the right of a number, i.e., 1010b.
To prove that 10102 is equal to 10 in the decimal system, refer to Table 6. The binary number 10102corresponds to one 23, no 22, one 21, and no 20 (ones). This is 8 + 2, or 10, thus proving 10 is equivalent to 10102.
10 in base 16 is Ah. The subscript on the A indicates this is a base 16 or hexadecimal number.
16 in base 16 is 10h. This is one 16 and no ones.
16 in base 2 is 100002. This is one 24, no 23, no 22, no 21, and no 20 (ones).
4096 in base 16 is 10000h. This is one 163, no 162, no 161, and 160 (ones).
There are rules for adding and subtracting numbers in base systems other than decimal, but for our purposes, as long as you can convert numbers back and forth between decimal, binary, and hexadecimal, you can use the more familiar decimal system for any computations.
- Fundamentals of Electric Vehicle Engineering
- MATLAB Fundamentals
- Fundamentals of Automobile Engineering
- Basics of Python Programming Language for Mechanical & Electrical Engineering
- Fundamentals of Vehicle Dynamics
- Electrical Engineering Fundamentals
- Autodesk Alias Certification Course
- Additive Manufacturing & Rapid prototyping
- Design of EV using MATLAB
- Electric Motorcycle / E-Bike Design Course using SOLIDWORKS
- CATIA – Computer Aided Drawing and Drafting
- Automotive Sketching & Drawing
- Battery Management System
- BS 6 Emission Norms and Control Stategies
- Fundamentals of ANSYS (FEA/FEM)
- MSC ADAMS Multibody Dynamics