Number system and data representations are the integral part of any embedded systems, and every embedded engineer should know about this. In this article we will read and discuss all important and different types of Number Systems used in Embedded Systems programming. All these are important number of 8051 microcontrollers and embedded systems, every embedded engineer must know about it. There are various important methods of presenting number systems in computer programming, they are as follows:
1. Binary Number System
2. Decimal Number Systems
3. Hexadecimal Number Systems
4. BCD (Binary Coded Decimal) Number
Binary Number System
In Binary Number Systems computer uses 0 and 1 digit to represent any single unit. It is base 2 number systems. It is also recognized as positional notation number system. Every binary digit is multiplied by 2 as per its number position.
Unlike other analog circuits where signal is has variable frequency and changes ups and downs, it changes from one value to another value in common working. But in digital signals, it remains only in two status 0 or 1, True or False, it is followed by every digital circuits. Logig 0 or Logic 1. In common sense, generally 0 is represented by Low signals and 1 is represented by High signals.
Decimal Number Systems
The easiest and common number system for number representation is a decimal value number can be seen every where in computing. Used by everyone in every area. It is a Base 10 number system. It uses digits from 0-9, the base of Decimal number systems is 10 because we use 0-9 ten numbers, while using a decimal number we follow positional notation system in computers. Every number is multiplied by the power of 10 based on the occurring position. In Decimal Number System, there are ten possible visible digits that appear with every digit position, so we need to display ten numerals important to represent the decimal quantity of each digit position. These are very common numbers starts from 0 to 9, 1,2,3,4,5,6,7,8,9.
Hexadecimal Number Systems
These are base 16 digits used in Hexadecimal Number System from 0 to 9 and A to F. Here important thing to understand is this that aphabets from A to F represents value from 10 to 15 for hexadecimals. So base of hexadecimal system is base 16, we represent all values as follows 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. There are four bits to represent a single digit in Hexadecimal Number Systems. Each bit has its own weight and more than 16 times significant value than the previous defined digit value in the position. It means the exact value of Hex numbers are decided by multiplying digit with the number from the value of the give position, then adds to the products.
BCD (Binary Coded Decimal) Number
BCD contains the code that represent any Decimal Value, A decimal number starts from 0 and ends with 9, in computer terminology BCD contains from 0-9 digit, and using BCD we can determine any of these digits using Binary Coding. A BCD is formed by four binary digits as always. If we need to form any number from 0-9 we can use any binary digits from 0000-1001 only.