Sie sind auf Seite 1von 31

School of Engineering and Physics

EE222- Digital Logic Design


Lab 1 - Numbers Systems

Group members: Sherlin Chand (S11170770)

Mohammed Azam (S11170901)

Aim

To familiarize oneself with converting numbers between common bases.

Equipment

A Working PC
Introduction
Number Systems in Digital Logic Design

To represent information in digital electronics, the number system is used. The number system
consist of different bases and the most commonly used ones are the decimal, binary, octal, and
hexadecimal. The base or radix of the number system is the total number of the digit used in
the number system. Suppose if the number system representing the digit from 0 – 9 then the
base of the system is the 10.[1]

Some of the essential types of number system(s) used are:

1. Decimal Number System


2. Binary Number System
3. Octal/Octadecimal Number System
4. Hexadecimal Number System

Figure 1: The above picture shows the different number systems that are used

1. Decimal Number System


This number system is having digit 0, 1, 2, 3, 4, 5, 6, 7, 8, 9; this number system is known
as a decimal number system since aggregate of ten digits are included. The radix of the
decimal number is 10.

2. Binary Number System


The cutting edge PCs don't process decimal number; they work with another number
system known as a binary number system which utilizes just two digits 0 and 1.The base
of parallel number framework is 2 since it has just two digit 0 and 1. The digital
electronic equipment are works on the binary number system and hence the decimal
number system is converted into binary system.[1]
3. Octadecimal Number System
The base of a number system is equivalent to the number of digits utilized, i.e., for
decimal number system the base is ten while for the binary system the base is two. The
octal system has the base of eight as it utilizes eight digits 0, 1, 2, 3, 4, 5, 6, 7.

4. Hexadecimal Number System


These numbers are utilized broadly in microchip work. The hexadecimal number system
has a base of 16, and thus it comprises of the accompanying sixteen number of digits.

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.

The size of the hexadecimal is a lot shorter than the binary number which makes them
simple to compose and recall. Let 0000 to 000F speaking to hexadecimal numbers from
zero to fifteen, at that point 0010, 0011, 0012 … and so on. Will speak to sixteen,
seventeen, and eighteen… and so on till 001F which leads to thirty and so on.[1]
Methodology
1) Flowcharts were drawn to demonstrate the procedures of converting between any
numbers with the following bases.
-decimal
-binary
-octal
-hexadecimal
All numbers were considered unsigned. The flowchart was checked by applying sample
numbers.
2) Flowchart was drawn to demonstrate the procedures of converting between any of the
numbers with the following bases
-Decimal to 2’s Complement
-2’s Complement to Decimal
- Sign and Magnitude to Decimal
- Decimal to Sign and Magnitude
- Decimal to 1’s Complement
-1’s Complement to Decimal
The number was assumed to be signed numbers and the flowchart was checked by
applying some sample number.
Part 1:

Decimal to Binary
Decimal to Octal decimal
Decimal to Hexadecimal
Binary to Decimal
Binary to Octadecimal
Binary to Hexadecimal
Octadecimal to Decimal
Octadecimal to Binary
Octadecimal to Hexadecimal
Hexadecimal to Decimal
Hexadecimal to Binary
Hexadecimal to Octadecimal
Part 2:

Decimal to 2’s complement


2’s complement to Decimal
Sign and magnitude to Decimal
Decimal to Sign and Magnitude
Decimal to 1’s Complement
1’s Complement to Decimal
Discussion
Number systems play important part in digital logic design as it is used in the designing of the
circuits. Unsigned binary numbers are positive numbers and thus do not require a sign that is
positive or negative, it is just assumed to be positive. An unsigned number represents all
numbers from the range zero to 2n−1 (n being the number of bits given). Example would be an
8 bit unsigned binary number would be from 0 to 255 10 in decimal and from 0 to FF16 in
hexadecimal which is similar to 16 bit unsigned binary number as well. Part one of the lab
shows the necessary procedures or steps in converting unsigned numbers with the following
bases that is base 2 which is binary and base 8 which is octadecimal and base 16 which is
hexadecimal. The flowcharts shown in the result section are the necessary procedures needed
to convert the numbers from one base to another. Generally, it is important to learn how to
convert numbers to other bases as it each individual bases has its own advantages and also
some bases has advantage over the other. For example, the advantages of octal decimal
number system and hexadecimal number system are; the octal and hexadecimal number
system is both used in memory addressing and microprocessor technology, hexa and octal
numbers are used as a ‘short hand’ way to represent string of bits, error prone to write the
binary number, in octal and hex less error. Furthermore, the second part of the lab was dealing
with signed numbers which required arithmetic sign. The most significant bit of any binary
number representing the sign bit of a binary number. For example if the sign bit is equal to zero
then the binary number is a positive number and if it is one, then it is equal to negative
number. The remaining bits after a signed bit are the representation actual number. There are 3
ways to represent negative numbers which are shown in the flowchart in the results section as
a part 2. The flow chart shows 3 ways in representing signed number in binary. It is seen that
the 2’s compliment is the most reliable way of representing signed numbers as there are no
double representation of zero.
Conclusion
After doing this lab, it could be stated that all the procedures and steps used in this lab helped
the individuals in converting a number from one number system to another. The lab handout
had the basic flowchart symbol that was helpful when making a flowchart of converting using
number system. For Part one, flowcharts were made to demonstrate the procedure of
converting any numbers with the given bases and the numbers were unsigned, that is the
numbers were assumed to be all positive. Part two of the lab, flowcharts was made to show the
steps in converting any number with the required bases and the numbers were signed, that is
the numbers were either positive or negative. Moreover, after the completion of the lab, it was
seen there are advantages of using various numbers system that is there would be less
computational errors and etc. Also the importance of learning on how to converting numbers
with common bases is also discussed. It was seen that the two’s compliment was the most
reliable method to convert number from one number system to another.
Reference
[1]"What is Number System in Digital Electronics? Definition & Types of Number Systems -
Circuit Globe", Circuit Globe, 2020. [Online]. Available: https://circuitglobe.com/number-
system-in-digital-electronics.html. [Accessed: 27- Feb- 2020].
Appendix

Das könnte Ihnen auch gefallen