You are on page 1of 15

ASHUTOSH SAMANTA

Camellia Institute Of Engineering and Technology

Electronics and Communication Engineering

University Roll No. 27100323010, Sem 3rd

Paper name- Digital System Design [EC302]

Email Id- ashutoshsamanta367@gmail.com

NUMBER SYSTEM: 1.Decimal number system:

A system that is used for representing numbers is


called the number system. In digital electronics, the The system of numbers which has base or radix 10,
i.e. uses total 10 symbols to represent numbers of
numbers are used to represent the information.
the system is called decimal number system. The
symbols used in the decimal number system are 0,
Hence, it is important to learn and understand
different types of number systems so we can easily 1, 2, 3, 4, 5, 6, 7, 8, 9; where each of these symbols
represent and interpret the information in the form assigned a specific value.
of numbers.
The decimal number system is a position value
system, which means the value of the digit depends
There are several types of number systems and the
on the position in the number. To understand the
basis of this classification is the base or radix of the
concept of position value system, consider the
number system. The base or radix of the number
following example.
system is the total number of symbols used to
denoted the numbers in the number system.
Let a decimal number 1234 which has total four
digits, this number can also be written as follows −

(1*103)+ (2*102)+ (3*101)+(4*100)


(1*1000)+ (2*1000) +(3*1000)+(4+1)
1000+200+30+4 = 1234

Hence, from this example, we can see that the value


of different digits of the number depends on their
respective position in the number.

Base 10 Powers of ten


The most commonly Understanding the place
Used number system value system in decimal
Types of Number Systems: In our everyday lives. numbers is crucial for
Each digit represents arithmetic operations.
Depending on the base or radix, number systems A power of 10. Ex: 10, 100, 1000,....
can be classified into the following four major types Examples: 0 ,1 ,2 ,3,...

1. Decimal Number System


2. Binary Number System Real life examples: Bank account balances,
3. Octal Number System measuring length/weight, and representing time all
4. Hexadecimal Number System use the decimal number system.
2.Binary number system:
The fundamental language of
A number system with base or radix 2 is called computers, consisting of only 0s
binary number system. The binary number system and 1s. Examples: 0, 1, 10, 11..
uses only 2 symbols (0 and 1) to represent binary
numbers.

All modern digital devices like computers,


combinational circuits, sequential circuits, etc. use
the binary number system to operate.

We can convert a binary number into its equivalent


decimal number as follows −

Let a binary number 1101 and we have to convert it


into an equivalent decimal number, then −

(1*23)+ (1*22)+ (0*21) +(1*20) Logic gates

8+4+0+1 = 13 Binary numbers are used to


represent and manipulate data
(1101)2= (13)10
inside electronic devices.
The base of the binary number system is two. It uses
the digits0 and 1 only. The two digits 0
and 1 are called a bit.

The place value of each position can be expressed in


terms of powers of 2 like 20,21,22,,etc for integer
part and 2-1,2-2,2-3 ,,etc for the fractional part . A
binary point separates the integer and fractional
part . The position weights in the binary is given
below

4 bit binary word --- nibble

8 bit binary word ---- byte

16 bit binary word---- word


Digital circuits
32 bit binary word ---- double word

Binary numbers help in


understanding how information is
processed in computers.

Base 2
3. Octal number system :
Base 8
A number system which has base 8 is called
anoctal number system. Therefore, the octal Octal numbers are expressed
numbersystem uses 8 symbols, (0, 1, 2, 3, 4, 5, using only the digits 0-7.
6, 7) torepresent the number. Examples: 0, 1, 6, 7...

An octal number can be converted into


anequivalent decimal number as follows. Unix file permissions

Let an octal number 124 and we need to find Octal numbers play a vital role
itsequivalent in decimal, then in representing and managing
file permissions in Unix-based
(1 x 8²) + (2 x 8¹) + (4 x 8°) Systems.

64+16+4= 84
Discrete mathematics
.. (124)8 = (84)10
In combinatorics and graph
The base of the octal number system is eight. It theory, octal numbers have
uses eight digits 0 1 2 3 4 5 6 𝑎𝑛𝑑 7 to form applications in set theory and
a number. network analysis.

The place value of each position can be


expressed in terms of powers of 8 like
80,81,82,83 etc for the integer part and 8-1,
8-2,8-3, etc for the fractional part.

An octal point separates the integer and


fractional part. Sets of 3-bit binary numbers can
be represented by octal numbers (000, 001,
010,011, 100, 101,110,111) and this can be
conveniently be used for entering data in the
computer.
4.Hexa decimal number system :

The Hexadecimal number system has a base of 1 Base 16


16. It has 16 distinct digit symbols. It uses
the digits 0 1 2 3 4 5 6 7 8 9 plus the letters 𝐴 𝐵 A compact representation of the binary
𝐶 𝐷 𝐸 𝑎𝑛𝑑 𝐹. Any hexadecimal digit can system, using digits 0-9 and letters A-F.
be represented by a group of four bit binary Examples : 0,1,A,F.....
sequence.

2 Computing and programming


That is the Hexadecimal numbersare
represented by sets of 4-bit binary sequence Hexadecimal numbers are commonly used in
(0000, 0001,0010, 0011, 0100,0101,0110, programming languages and memory
0111,1000,1001,1010,1011,1100,1101,1110,11 addresses.
11).
3 Colour codes

Hexadecimal numbers are used to represent


colors in web design and graphics software.

4 Debugging

Hexadecimal numbers help programmers


debug and understand memory dumps and
error codes.
Decimal to binary conversation : Hexa decimal to decimal:

Decimal number can be convertedto binary by A hexadecimal number can be converted into
repeatedly dividing the number by 2 for decimal number by adding the products of
integer part and collecting the reminders. each digit and its corresponding weight. The
weights are power of 16.
The remainders can be written in the reverse
order(from bottom to top) to get binary result.
For fractional part, it has to be multiplied by Decimal to hexadecimal:
2 successively and collecting the carries, to
write from top to bottom. Decimal number can be converted to
hexadecimal by repeatedly dividing the number
The multiplication is by 16
repeated till the fractional part becomes zero for integer part and collecting the reminders.
or the required number of significant bit is The remainders can be written in the reverse
obtained. order (from bottom to top) to get hex result.
For fractional part, it has to be multiplied by 16
successively and collecting the carries, to write
Binary to decimal conversation: from top to bottom. The multiplication is
repeated till the fractional part becomes zero
A binary number can be converted into decimal or the required numbers of significant digits are
number by adding the products of obtained.
eachbitanditscorresponding weight.
Hexa decimal to binary :
Example:
(i) (101)2 = 1 × 2 Hexadecimal numbers can be converted into
2+0×2 binary numbers by converting each
1+1×2 hexadecimal digit to its 4-bit binary equivalent.
0
=4+0+1 Binary to hexa decimal:
= (5)10
(ii) (10011)2 = 1 × 2 Conversion from binary to hexadecimal is easily
4+0×2 accomplished by partitioning the binary
3+0×2 number into groups of four binary digits,
2+1×2 starting from the binary point to the left and to
1+1×2 the right. It may be necessary to add zeros to
0 the last group, if it does not end in exactly four
= 16 + 0 + 0 + 2 + 1 bits. Each group of 4-bits binary must be
= (19)10 represented by its hexadecimal equivalen .
(iii) (0.101)2 = 1 × 2
−1 + 0 × 2 Octal to decimal:
−2 + 1 × 2
−3 Anoctal number can be converted into decimal
= 1 × 0.5 + 0 + 1 × 0.125 number by adding the products of each digit
= 0.5 + 0 + 0.125 and its corresponding weight. The weights are
= (0.625)10 power of 8.
(iv) (1101011.1011)2
(1101011)2 = 1 × 2
Decimal to octal: Hexa decimal to octal:

Decimal number can be converted to octal by This can be achieved by first writing down the
repeatedly dividing the number by 8 for four bit binary equivalent of hexadecimal
integer part and collecting the reminders. The digit and then partitioning it into group of 3
remainders can be written in the reverse bits each.
order (from bottom to top) to get octal result.
For fractional part, it has to be multiplied by 8
successively and collecting the carries, to write
from top to bottom. The multiplication is
repeated till the fractional part becomes zero or
the required numbers of significant digits
are obtained.

Octal to binary:

Octal numbers can be converted into binary


numbers by converting each octal digit to its 3-
bit binary equivalent

(27)8=(010 111)2
(135)8=(001 011 101)2
(45.5)8=(100 101 .101)2
Octal to hexa decimal:
Binary to octal:
This can be achieved by first writing down the
Conversion from binary to octal is the simplest
three bit binary equivalent of octal digit
procedure by grouping the binary number
and then partitioning it into group of 4 bits
into groups of three binary digits, starting from
each.
the binary point to the left and to the right.

It may be necessary to add zeros to the last


group, if it does not end in exactly three bits.
Each group of 3-bits binary must be represented
by its octal equivalent.

1. (10 101) 2 = (010 101) 2 = (25) 8


2. (101011) 2 = (101 011) 2 = (53) 8
3. (11110.11) 2 = (011 110 . 110) 2 = (36.6) 8
4. (11011011. 1111)2 = (011 011 011. 111 100)2 =
(333.74) 8
Binary codded system: Excess-3 code:

Binary codes are broadly classified into Numeric Excess-3 code is an important BCD code, is a 4
codes, Alphanumeric codes and bit code and used with BCD numbers
Error detecting codes. Numeric codes are as weights are not assigned, it is a kind of non-
further classified into weighted codes and non- weighted codes. Excess-3 code was used on
weighted codes. The most obvious way of some older computers, cash registers and hand
encoding digits is "natural BCD" (NBCD), where held portable electronic calculators.
each decimal digit is represented by its
corresponding four-bit binary value. This is also The Excess-3 code for a given decimal number
called "8421" encoding. is determined by adding '3' to each decimal
digit in the given number and then replacing
Standard binary coded decimal code is each digit of the newly found decimal number
commonly known as a weighted 8421 BCD by its four bit binary equivalent. The table gives
code, with 8, 4, 2 and 1 representing the the Excess-3 code.
weights of the different bits starting from the
most significant bit (MSB) and proceeding Excess-3 to decimal:
towards the least significant bit (LSB). The
weights of From given Excess-3 code, the equivalent
the individual positions of the bits of a BCD decimal number can be determined by first
code are: 2 splitting the number into four-bit groups,
3 = 8, 2 starting from radix point and then subtracting
2 = 4, 2 0011 from each four-bit group. This gives us
1 = 2, 2 8421 BCD equivalent of the given Excess-3
0 = 1. code, which can then be converted into the
equivalent decimal number.
Example:
The main advantage of the Binary Coded Determine the decimal equivalent for the
Decimal system is that it is a fast and Excess-3 code 1000110.
efficient system to convert the decimal
numbers into binary numbers as compared to
the pure binary system However, the
disadvantage is that BCD code is inefficient as
the states between 1010(decimal 10), and 1111
(decimal 15) are not used.

In non-weighted code, there is no positional


weight i.e. each position within the
binary number is not assigned a prefixed value.
No specific weights are assigned to bit
position in non –weighted code. The non-
weighted codes are classified to
a) The Excess-3 codeb) The Gray code.
Gray code:

The Gray code was designed by Frank Gray at A complete alphanumeric code would include
Bell Labs in 1953. It belongs to a class of codes the 26 lowercase letters , 26 uppercase letters,
called the minimum change code. The 10 numeric digits, 7 punctuation marks and
successive coded characters never differ in anywhere from 20 to 40 other characters such
more than one-bit.The Gray code is a non- as +, /, * , # and so on. That is it represents all
weighted code. of the various characters and functions that
are found on a standard typewriter or
computer keyboard. The most common
Because of this, the· gray code is not suitable alphanumeric codes used are ASCII code,
for arithmetic operations but finds applications EBCDIC code and Unicode.
in input/output devices, some analog-to-
digital converters and designation of rows and
columns in Karnaugh map etc. ASCII code:

The full form of ASCII code is American


A three-bit gray code can be obtained by Standard Code for Information Interchange.
merely reflecting the two-bit code about It is a seven bit code based on the English
an axis at the end of the code and assigning a alphabet. In 1967 this code was first published
third-bit as 0 above the axis and as 1 below and since then it is being modified and
the axis. The reflected gray code is nothing but updated. ASCII code has 128 characters some
code written in reverse order. By reflecting of which are enlisted below to get familiar with
three-bit code, a four-bit code may be the code.
obtained.

EBCDIC code:
Alpha numeric code:
The EBCDIC stands for Extended Binary Coded
Alphanumeric codes are also called character Decimal Interchange Code. IBM
codes due to their certain properties. invented this code to extend the Binary Coded
These codes are basically binary. These codes Decimal which existed at that time.
are used to write alphanumeric data,
including data, letters of the alphabet, All the IBM computers and peripherals use this
numbers, mathematical symbols and code. It is an 8 bit code and therefore can
punctuation marks which can be easily accommodate 256 characters. Below is given
understandable and can be processed by the some characters of EBCDIC code to get familiar
computers. with it.

Input output devices such as keyboards,


monitors, mouse can be interfaced using these
codes.
Signed and Unsigned Numbers

Every Computer Programmer must understand There are several ways we can represent signed
Signed and Unsigned Numbers and its significance. numbers in binary, but the most common
Positive numbers are represented as unsigned representation used is called two’s complement
numbers. So we don’t need to use +ve sign in front method.
of them. However, when it comes to negative
numbers we use –ve sign. This shows that number is The term two’s complement is somewhat
negative and different from positive unsigned value. ambiguous, in that it is used in two different ways.
This is why it’s represented as signed numbers. First, as a representation, two’s complement is a
way of interpreting and assigning meaning to a bit
In Number System we’ve assumed, we have as many pattern contained in a fixed precision binary
bits as needed to represent numbers. But in quantity. Second, the term two’s complement is also
computers, we have a fix number of bits to used to refer to an operation that can be performed
represent value. These bit sizes are typically 8-bit, on the bits of a binary quantity.
16-bit, 32-bit, 64-bit. These sizes are usually multiple
of 8, because system memories are organized on an As an operation, the two’s complement of a
8-bit byte basis. number is formed by inverting all of the bits and
adding 1 to it. In a binary number being interpreted
When a specific number of bits being used to using the two’s complement representation, the
represent a number. This number determines the high order bit of the number indicates the sign. If
range of possible values that can be represented. the sign bit is 0, the number is positive, and if the
For example, there are 256 possible combinations of sign bit is 1, the number is negative. For positive
8-bits, therefore an 8-bit number can represent 256 numbers, the rest of the bits hold the true
distinct numeric values and the range is typically magnitude of the number. For negative numbers,
considered to be 0-255 (we have provided table in the lower order bits hold the magnitude of the
later part of this tutorial). So we can’t represent number. It is important to note that two’s
numbers larger than 255 using 8-bit number. complement representation can only be applied to
Similarly, 16 bits allows a range of 0-65535. fixed precision quantities, that is, quantities where
there are a set number of bits.
Until now we have only considered positive values
for binary numbers. When a fixed binary number is The 2’s complement method of representation is
used to hold positive values, it is considered as used because it reduces the complexity of the
unsigned. In this case, the range of positive values hardware in the ALU (arithmetic-logic unit) of a
that can be represented is from 0 – 2n-1, where n is computer’s CPU. Using a 2’s complement method,
the number of bits being used. all of the arithmetic operations can be performed by
the same hardware whether the numbers are
It is also possible to represent signed (negative as considered to be unsigned or signed. The bit
well as positive) numbers in binary. In this case, operations performed are identical; the difference
some part of the total range of values is used to comes from the interpretation of the bits. The
represent positive values, and the remaining of the interpretation of the value will be different
range is used to represent negative values. depending on whether the value is considered to be
unsigned or signed.
The integer variables are represented in a
signed and unsigned manner. The positive and
negative values are differentiated by using the
sign flag in signed numbers.

The unsigned numbers do not use any flag for


the sign, i.e., only positive numbers can be
stored by the unsigned numbers.

It is very easy to represent positive and


negative numbers in our day to day life. We
represent the positive numbers without adding
any sign before them and the negative number
with - (minus) sign before them.
1. Unsigned Numbers:

But in the digital system, it is not possible to As we already know, the unsigned numbers don't
use negative sign before them because the data have any sign for representing negative numbers. So
is in binary form in digital computers. the unsigned numbers are always positive.

For representing the sign in binary numbers, By default, the decimal number representation is
we require a special notation. positive. We always assume a positive sign in front
of each decimal digit.
Binary Numbers Representation:
There is no sign bit in unsigned binary numbers so it
can only represent its magnitude. In zero and one,
Our computer can understand only (0, 1)
zero is an unsigned binary number.
language. The binary numbers are represented
in both ways, i.e., signed and unsigned. There is only one zero (0) in this representation,
which is always positive. Because of one unique
The positive numbers are represented in both binary equivalent form of a number in unsigned
ways- signed and unsigned, but the negative number representation, it is known as unambiguous
numbers can only be described in a signed way. representation technique. The range of the
unsigned binary numbers starts from 0 to (2n-1).
The difference between unsigned and signed
numbers is that unsigned numbers do not use
any sign bit for positive and negative numbers
identification, but the signed number used.
2. Signed Numbers: Applications of Different Number System:

Decimal System:
The signed numbers have a sign bit so that it can
differentiate positive and negative integer numbers. Used for everyday calculations, financial
The signed binary number technique has both the transactions, and measurements.
sign bit and the magnitude of the number.
Binary System:
For representing the negative decimal number, the
corresponding symbol in front of the binary number Vital for computer programming, digital circuits,
will be added. and data storage.

The signed numbers are represented in three ways. Hexa Decimal System:
The signed bit makes two possible representations
of zero (positive (0) and negative (1)), which is an Commonly used in web development (color
ambiguous representation. codes) and memory representation.

The third representation is 2's complement Octal System:


representation in which no double representation of
zero is possible, which makes it unambiguous Significant in Unix file permissions and discrete
representation. There are the following types of mathematics applications.
representation of signed binary numbers.

Sign magnitude form:

In this form, a binary number has a bit for a sign


symbol. If this bit is set to 1, the number will be
negative else the number will be positive if it is set
to 0. Apart from this sign-bit, the n-1 bits represent
the magnitude of the number.

1’s Complement:

By inverting each bit of a number, we can obtain the


1's complement of a number. The negative numbers
can be represented in the form of 1's complement.

In this form, the binary number also has an extra bit


for sign representation as a sign-magnitude form.

2’nd Complement:

By inverting each bit of a number and adding plus 1


to its least significant bit, we can obtain the 2's
complement of a number. The negative numbers
can also be represented in the form of 2's
complement.

In this form, the binary number also has an extra bit


for sign representation as a sign-magnitude form.
Conclution: Reference:

Understanding the different number systems AACEl. 2008. Recommended Practice 40R-08:
expands our mathematical and Contingency Estimating: Basic Principles.Association
technological horizons. From everyday life to for the Advancement of Cost Engineering
advanced computer science, the versatility of International, Morgantown, W.Va.
number systems is truly remarkable.
AACEL. 2009. 38R-06: Documenting the Schedule
Basis. Association for the Advancementof Cost
Engineering International, Morgantown, W.Va.

AACEL. 2010. Recommended Practice 34R-05: Basis


of Estimate. Association for the

Advancement of Cost Engineering International,


Morgantown, W.Va.

Anderson, 5., K. R. Molenaat, and C. Schexnayder


2009. NCHRP Report 625: ProceduresGuide for Right
of Way Cost Estimation and Cost Management.
Transportation ResearchBoard of the National
Academies, Washington, D.C.

Andrle, S. J., E. T. Cackler, T. Ferragut, and R.


McDaniel. 2003. Detailed Plamning forResearch on
Accelerating the Renewal of America's Highways.
NCHRP Project 20-58(1).Transportation Research
Board of the National Academirs, Washington, D.C.

You might also like