Digital Logic Design – Introduction to Number Systems
In this lecture, we are going to talk about number systems. There are several number systems in mathematics. However, we are only going to deal with certain ones such as binary, decimal, octal, and hexadecimal number systems. The decimal number system of base 10 is what we use in our everyday lives since we were children to count things. However, digital systems like computers only work with the binary number system. In addition, octal and hexadecimal numbers are used to represent binary numbers in a compacted notation so binary numbers can be easier to read. Thus, that is why we use different number systems.
A number system is a mathematical notation for a number that uses symbols, which represent numbers. Symbols or numbers like 1, 2, and 3 represent the amount of objects and time in reality. Numbers are nothing but collection of symbols. Also, it is important on how symbols are arranged. In general, numbers are set up by using the positional notation, which is a system that sets up symbols with order of magnitudes. For an example, the number 123 is different from 321. We can use positional notation to see why the arrangement of symbols matter. Let us use those numbers again as an example. Those two numbers can be represented as
That also shows that 123 is not the same as 321. The tens that are being raised to a power of a number represent the digit’s place. For an example, represents the ones place, represents the tens place, and so on. Therefore, a number is not just a collection of digits but a sequenced collection of digits.
Numbers with Fractions
Numbers can have two parts.
- Integer Portion – a part of a number that comes before the decimal point (.).
- Fractional Portion – a part of a number that comes after the decimal.
For an example, let us take a look at the number 123.56. The integer portion is 123 since it comes before the decimal point. The fractional portion is 56 since it is declared after the decimal point. In addition, we can use positional notation for this kind of number as well.
Types of Number System
There are different types of number systems which are signified by their bases. Base of a number system is the number of symbols used in its representation. For an example, the decimal-number system has 10 different symbols ranged from 0-9, which makes this as base 10. Similarly, the binary-number system has 2 different symbols, 0 and 1, which makes this as base 2.
The proper format of creating numbers with number systems is
where is any number, and where is any base. Let us take a look at an example. Let us use the number 75 and specify its base. To accomplish that, we write it out like where 10 represents base 10.
The Number Systems We Will Use
We will use the following number systems below for this course.
- Decimal Number System
- Binary Number System
- Octal Number System
- Hexadecimal Number System
1. Decimal Number – a number expressed in the decimal-number system or base 10 number system which represents the numeric values using 10 different symbols from 0 to 9. The numbers included in the decimal-number system are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Hence, it is base 10.
2. Binary Number – a number expressed in the binary number system or base 2 number system, which represents the numeric value using two different symbols 0 and 1. Hence, its base is 2. Each digit can be called as a bit. For the next example, we will use 4 bits, and we will find out what the binary numbers are equivalent to in decimal numbers. The numbers are
and so on. We could keep going by adding one to the binary number to get to the next value, but that is for a future lesson.
3. Octal Number – a number expressed in the octal number system or base 8 number system. Furthermore, it represents the numeric values using 8 different symbols from 0 to 7. The numbers included in octal number system are 0, 1, 2, 3, 4, 5, 6, and 7. Hence, its base is 8.
Why We use Octal Number System?
We can use octal to represent binary numbers in shorthand notations. For an example, The binary number can be represented as in octal. Each digit from the octal number system represents 3 digits from the binary system. Thus, the binary number 10 represents 2 in octal. The binary number 101 represents 5 in octal. Finally, the binary number 111 represents 7 in octal.
4. Hexadecimal Number – a number expressed in the hexadecimal-number system or base 16 number system. This number system uses 16 different symbols. All symbols in base 16 represent a single digit. However, numbers greater than 9 have two digits in base 10. We ran out of symbols to use for bases higher than base 10. Since we only have 10 existing symbols that represent a single digit, we have to come up with new symbols that represent a single digit greater than 9 in base 16. Thus, those new symbols are
As a result, the hexadecimal number system has symbols consist of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F.
Why We Use Hexadecimal Number System?
We can use hexadecimal numbers to represent binary numbers in shorthand notations like how the octal number system can, but the hexadecimal number system is better. For an example, The binary number can be represented as in hexadecimal. Each digit from hexadecimal represents 4 digits from the binary system. Thus, the binary number 1010 is A in hexadecimal, and the binary number 1111 is F in hexadecimal as well.
Positional notation can also be used for any numbers in any base cases. Let us look at number 123 again.
The tens you see above represent base 10. Remember that those tens represent the digit’s place as well. In addition, we can do the same for different number systems like binary numbers.
Since binary numbers are base 2, those twos that are being multiplied with a number represent the bit’s place.
A Single Number in Different Number Systems
Let us use number 65 as an example, and let us see what that number looks like in different number systems.
In the next lesson, we will go over on how to convert numbers from one number system to another.
In this lesson, we talked about how numbers are represented in different number systems. There are reasons to have different ones. We use binary numbers to represent low and high states in digital systems. We use decimal numbers to count objects and time. Finally, we use octal and hexadecimal numbers to represent binary numbers in shorthand notations. The next lesson will cover number-system conversions.