[go: up one dir, main page]

0% found this document useful (0 votes)
10 views18 pages

Combinational Logic Circuits

Uploaded by

futuregad8s
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views18 pages

Combinational Logic Circuits

Uploaded by

futuregad8s
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Combinational Logic circuits

The combinational logic circuits are the circuits that contain different types of logic gates. Simply, a
circuit in which different types of logic gates are combined is known as a combinational logic circuit.
The output of the combinational circuit is determined from the present combination of inputs,
regardless of the previous input. The input variables, logic gates, and output variables are the basic
components of the combinational logic circuit. There are different types of combinational logic circuits,
such as Adder, Subtractor, Decoder, Encoder, Multiplexer, and De-multiplexer.

There are the following characteristics of the combinational logic circuit:

o At any instant of time, the output of the combinational circuits depends only on the present
input terminals.

o The combinational circuit doesn't have any backup or previous memory. The present state of
the circuit is not affected by the previous state of the input.

o The n number of inputs and m number of outputs are possible in combinational logic
circuits.

The 'n' input variable comes from the external source while the 'm' output variable goes to the
external destination. In many applications, the source or destinations are storage registers.

Sequential circuits:-

The sequential circuit is a special type of circuit that has a series of inputs and outputs. The outputs of
the sequential circuits depend on both the combination of present inputs and previous outputs. The
previous output is treated as the present state. So, the sequential circuit contains the combinational
circuit and its memory storage elements. A sequential circuit doesn't need to always contain a
combinational circuit. So, the sequential circuit can contain only the memory element.
Difference between the combinational circuits and sequential circuits are given below:

Combinational Circuits Sequential Circuits

1) The outputs of the combinational circuit The outputs of the sequential circuits depend on both
depend only on the present inputs. present inputs and present state(previous output).

2) The feedback path is not present in the The feedback path is present in the sequential circuits.
combinational circuit.

3) In combinational circuits, memory elements In the sequential circuit, memory elements play an
are not required. important role and require.

4) The clock signal is not required for The clock signal is required for sequential circuits.
combinational circuits.

5) The combinational circuit is simple to design. It is not simple to design a sequential circuit.
Number System
In a digital system, the system can understand only the optional number system. In these systems, digits
symbols are used to represent different values, depending on the index from which it settled in the
number system.
In simple terms, for representing the information, we use the number system in the digital system.
The digit value in the number system is calculated using:

1. The digit

2. The index, where the digit is present in the number.

3. Finally, the base numbers, the total number of digits available in the number system.

Note: When the number system represents a digit from 0 - 9, the base of the number will be 10.

Types of Number System

In the digital computer, there are various types of number systems used for representing information.

1. Binary Number System

2. Decimal Number System

3. Hexadecimal Number System

4. Octal Number System

Binary Number System

Generally, a binary number system is used in the digital computers. In this number system, it carries
only two digits, either 0 or 1. There are two types of electronic pulses present in a binary number
system. The first one is the absence of an electronic pulse representing '0'and second one is the
presence of electronic pulse representing '1'. Each digit is known as a bit. A four-bit collection (1101)
is known as a nibble, and a collection of eight bits (11001010) is known as a byte. The location of a
digit in a binary number represents a specific power of the base (2) of the number system.
Characteristics:

1. It holds only two values, i.e., either 0 or 1.

2. It is also known as the base 2 number system.

3. The position of a digit represents the 0 power of the base(2). Example: 20

4. The position of the last digit represents the x power of the base(2). Example: 2x, where x
represents the last position, i.e., 1

Examples:

(10100)2, (11011)2, (11001)2, (000101)2, (011010)2.

Decimal Number System


The decimal numbers are used in our day-to-day life. The decimal number system contains ten digits
from 0 to 9(base 10). Here, the successive place value or position, left to the decimal point holds units,
tens, hundreds, thousands, and so on.

The position in the decimal number system specifies the power of the base (10). The 0 is the minimum
value of the digit, and 9 is the maximum value of the digit. For example, the decimal number 2541
consist of the digit 1 in the unit position, 4 in the tens position, 5 in the hundreds position, and 2 in the
thousand positions and the value will be written as:

(2×1000) + (5×100) + (4×10) + (1×1)

(2×103) + (5×102) + (4×101) + (1×100)

2000 + 500 + 40 + 1

2541

Octal Number System

The octal number system has base 8(means it has only eight digits from 0 to 7). There are only eight
possible digit values to represent a number. With the help of only three bits, an octal number is
represented. Each set of bits has a distinct value between 0 and 7.

Below, we have described certain characteristics of the octal number system:

Characteristics:

1. An octal number system carries eight digits starting from 0, 1, 2, 3, 4, 5, 6, and 7.

2. It is also known as the base 8 number system.

3. The position of a digit represents the 0 power of the base(8). Example: 80

4. The position of the last digit represents the x power of the base(8). Example: 8x, where x
represents the last position, i.e., 1
Number Octal Number

0 000

1 001

2 010

3 011

4 100

5 101

6 110

7 111

Examples:

(273)8, (5644)8, (0.5365)8, (1123)8, (1223)8.

Hexadecimal Number System


It is another technique to represent the number in the digital system called the hexadecimal number
system. The number system has a base of 16 means there are total 16 symbols(0, 1, 2, 3, 4, 5, 6, 7, 8,
9, A, B, C, D, E, F) used for representing a number. The single-bit representation of decimal values10,
11, 12, 13, 14, and 15 are represented by A, B, C, D, E, and F. Only 4 bits are required for representing
a number in a hexadecimal number. Each set of bits has a distinct value between 0 and 15. There are
the following characteristics of the octal number system:

Characteristics:

1. It has ten digits from 0 to 9 and 6 letters from A to F.

2. The letters from A to F defines numbers from 10 to 15.

3. It is also known as the base 16number system.

4. In hexadecimal number, the position of a digit represents the 0 power of the base(16).
Example: 160
5. In hexadecimal number, the position of the last digit represents the x power of the base(16).
Example: 16x, where x represents the last position, i.e., 1

Binary Number Hexadecimal Number

0000 0

0001 1

0010 2

0011 3

0100 4

0101 5

0110 6

0111 7

1000 8

1001 9

1010 A

1011 B

1100 C

1101 D

1110 E

1111 F

Examples:

(FAC2)16, (564)16, (0ABD5)16, (1123)16, (11F3)16.


Number Base Conversion
As, we have four types of number systems so each one can be converted into the remaining three
systems. There are the following conversions possible in Number System

1. Binary to other Number Systems.

2. Decimal to other Number Systems.

3. Octal to other Number Systems.

4. Hexadecimal to other Number Systems.

Binary to Decimal Conversion

The process of converting binary to decimal is quite simple. The process starts from multiplying the
bits of binary number with its corresponding positional weights. And lastly, we add all those products.

Let's take an example to understand how the conversion is done from binary to decimal.

Example 1: (10110.001)2

We multiplied each bit of (10110.001)2 with its respective positional weight, and last we add the
products of all the bits with its weight.

(10110.001)2=(1×24)+(0×23)+(1×22)+(1×21)+(0×20)+(0×2-1)+(0×2-2)+(1×2-3)
(10110.001)2=(1×16)+(0×8)+(1×4)+(1×2)+(0×1)+(0×1⁄2)+(0×1⁄4)+(1×1⁄8)
(10110.001)2=16+0+4+2+0+0+0+0.125
(10110.001)2=(22.125 )10
Binary to Octal Conversion

The base numbers of binary and octal are 2 and 8, respectively. In a binary number, the pair of three
bits is equal to one octal digit. There are only two steps to convert a binary number into an octal
number which are as follows:

1. In the first step, we have to make the pairs of three bits on both sides of the binary point. If
there will be one or two bits left in a pair of three bits pair, we add the required number of
zeros on extreme sides.

2. In the second step, we write the octal digits corresponding to each pair.

Example 1: (111110101011.0011)2

1. Firstly, we make pairs of three bits on both sides of the binary point.

111 110 101 011.001 1

On the right side of the binary point, the last pair has only one bit. To make it a complete pair of three
bits, we added two zeros on the extreme side.

111 110 101 011.001 100

2. Then, we wrote the octal digits, which correspond to each pair.

(111110101011.0011)2=(7653.14)8

Binary to Hexadecimal Conversion

The base numbers of binary and hexadecimal are 2 and 16, respectively. In a binary number, the pair
of four bits is equal to one hexadecimal digit. There are also only two steps to convert a binary number
into a hexadecimal number which are as follows:

1. In the first step, we have to make the pairs of four bits on both sides of the binary point. If
there will be one, two, or three bits left in a pair of four bits pair, we add the required number
of zeros on extreme sides.

2. In the second step, we write the hexadecimal digits corresponding to each pair.

Example 1: (10110101011.0011)2

1. Firstly, we make pairs of four bits on both sides of the binary point.

111 1010 1011.0011

On the left side of the binary point, the first pair has three bits. To make it a complete pair of four bits,
add one zero on the extreme side.

0111 1010 1011.0011

2. Then, we write the hexadecimal digits, which correspond to each pair.

(011110101011.0011)2=(7AB.3)16

Decimal to other Number System

The decimal number can be an integer or floating-point integer. When the decimal number is a
floating-point integer, then we convert both part (integer and fractional) of the decimal number in the
isolated form(individually). There are the following steps that are used to convert the decimal number
into a similar number of any base 'r'.

1. In the first step, we perform the division operation on integer and successive part with base 'r'.
We will list down all the remainders till the quotient is zero. Then we find out the remainders
in reverse order for getting the integer part of the equivalent number of base 'r'. In this, the
least and most significant digits are denoted by the first and the last remainders.

2. In the next step, the multiplication operation is done with base 'r' of the fractional and
successive fraction. The carries are noted until the result is zero or when the required number
of the equivalent digit is obtained. For getting the fractional part of the equivalent number of
base 'r', the normal sequence of carrying is considered.

Decimal to Binary Conversion

For converting decimal to binary, there are two steps required to perform, which are as follows:

1. In the first step, we perform the division operation on the integer and the successive quotient
with the base of binary(2).

2. Next, we perform the multiplication on the integer and the successive quotient with the base
of binary(2).

Example 1: (152.25)10

Step 1:

Divide the number 152 and its successive quotients with base 2.

Operation Quotient Remainder

152/2 76 0 (LSB)

76/2 38 0

38/2 19 0

19/2 9 1

9/2 4 1

4/2 2 0

2/2 1 0

1/2 0 1(MSB)

(152)10=(10011000)2
Step 2:

Now, perform the multiplication of 0.27 and successive fraction with base 2.

Operation Result carry

0.25×2 0.50 0

0.50×2 0 1

(0.25)10=(.01)2

Decimal to Octal Conversion

For converting decimal to octal, there are two steps required to perform, which are as follows:

1. In the first step, we perform the division operation on the integer and the successive quotient
with the base of octal(8).

2. Next, we perform the multiplication on the integer and the successive quotient with the base
of octal(8).

Example 1: (152.25)10

Step 1:

Divide the number 152 and its successive quotients with base 8.

Operation Quotient Remainder

152/8 19 0

19/8 2 3

2/8 0 2

(152)10=(230)8

Step 2:

Now perform the multiplication of 0.25 and successive fraction with base 8.

Operation Result carry

0.25×8 0 2

(0.25)10=(2)8

So, the octal number of the decimal number 152.25 is 230.2


Decimal to hexadecimal conversion

For converting decimal to hexadecimal, there are two steps required to perform, which are as follows:

1. In the first step, we perform the division operation on the integer and the successive quotient
with the base of hexadecimal (16).

2. Next, we perform the multiplication on the integer and the successive quotient with the base
of hexadecimal (16).

Example 1: (152.25)10

Step 1:

Divide the number 152 and its successive quotients with base 8.

Operation Quotient Remainder

152/16 9 8

9/16 0 9

(152)10=(98)16

Step 2:

Now perform the multiplication of 0.25 and successive fraction with base 16.

Operation Result carry

0.25×16 0 4

(0.25)10=(4)16

So, the hexadecimal number of the decimal number 152.25 is 230.4.

Octal to other Number System

Like binary and decimal, the octal number can also be converted into other number systems. The
process of converting octal to decimal differs from the remaining one. Let's start understanding how
conversion is done.

Octal to Decimal Conversion

The process of converting octal to decimal is the same as binary to decimal. The process starts from
multiplying the digits of octal numbers with its corresponding positional weights. And lastly, we add
all those products.

Let's take an example to understand how the conversion is done from octal to decimal.

Example 1: (152.25)8

Step 1:
We multiply each digit of 152.25 with its respective positional weight, and last we add the products of
all the bits with its weight.

(152.25)8=(1×82)+(5×81)+(2×80)+(2×8-1)+(5×8-2)
(152.25)8=64+40+2+(2×1⁄8)+(5×1⁄64)
(152.25)8=64+40+2+0.25+0.078125
(152.25)8=106.328125

So, the decimal number of the octal number 152.25 is 106.328125

Octal to Binary Conversion

The process of converting octal to binary is the reverse process of binary to octal. We write the three
bits binary code of each octal number digit.

Example 1: (152.25)8

We write the three-bit binary digit for 1, 5, 2, and 5.

(152.25)8=(001101010.010101)2

So, the binary number of the octal number 152.25 is (001101010.010101)2

Octal to hexadecimal conversion

For converting octal to hexadecimal, there are two steps required to perform, which are as follows:

1. In the first step, we will find the binary equivalent of number 25.

2. Next, we have to make the pairs of four bits on both sides of the binary point. If there will be
one, two, or three bits left in a pair of four bits pair, we add the required number of zeros on
extreme sides and write the hexadecimal digits corresponding to each pair.

Example 1: (152.25)8

Step 1:

We write the three-bit binary digit for 1, 5, 2, and 5.

(152.25)8=(001101010.010101)2

So, the binary number of the octal number 152.25 is (001101010.010101)2

Step 2:

1. Now, we make pairs of four bits on both sides of the binary point.

0 0110 1010.0101 01

On the left side of the binary point, the first pair has only one digit, and on the right side, the last pair
has only two-digit. To make them complete pairs of four bits, add zeros on extreme sides.

0000 0110 1010.0101 0100

2. Now, we write the hexadecimal digits, which correspond to each pair.

(0000 0110 1010.0101 0100)2=(6A.54)16

Hexa-decimal to other Number System


Like binary, decimal, and octal, hexadecimal numbers can also be converted into other number
systems. The process of converting hexadecimal to decimal differs from the remaining one. Let's start
understanding how conversion is done.

Hexa-decimal to Decimal Conversion

The process of converting hexadecimal to decimal is the same as binary to decimal. The process starts
from multiplying the digits of hexadecimal numbers with its corresponding positional weights. And
lastly, we add all those products.

Let's take an example to understand how the conversion is done from hexadecimal to decimal.

Example 1: (152A.25)16

Step 1:

We multiply each digit of 152A.25 with its respective positional weight, and last we add the products
of all the bits with its weight.

(152A.25)16=(1×163)+(5×162)+(2×161)+(A×160)+(2×16-1)+(5×16-2)
(152A.25)16=(1×4096)+(5×256)+(2×16)+(10×1)+(2×16-1)+(5×16-2)
(152A.25)16=4096+1280+32+10+(2×1⁄16)+(5×1⁄256)
(152A.25)16=5418+0.125+0.125
(152A.25)16=5418.14453125

So, the decimal number of the hexadecimal number 152A.25 is 5418.14453125

Hexadecimal to Binary Conversion

The process of converting hexadecimal to binary is the reverse process of binary to hexadecimal. We
write the four bits binary code of each hexadecimal number digit.

Example 1: (152A.25)16

We write the four-bit binary digit for 1, 5, A, 2, and 5.

(152A.25)16=(0001 0101 0010 1010.0010 0101)2

So, the binary number of the hexadecimal number 152.25 is (1010100101010.00100101)2

Hexadecimal to Octal Conversion

For converting hexadecimal to octal, there are two steps required to perform, which are as follows:

1. In the first step, we will find the binary equivalent of the hexadecimal number.

2. Next, we have to make the pairs of three bits on both sides of the binary point. If there will be
one or two bits left in a pair of three bits pair, we add the required number of zeros on extreme
sides and write the octal digits corresponding to each pair.

Example 1: (152A.25)16

Step 1:

We write the four-bit binary digit for 1, 5, 2, A, and 5.

(152A.25)16=(0001 0101 0010 1010.0010 0101)2

So, the binary number of hexadecimal number 152A.25 is (0011010101010.010101)2


Step 2:

3. Then, we make pairs of three bits on both sides of the binary point.

001 010 100 101 010.001 001 010

4. Then, we write the octal digit, which corresponds to each pair.

(001010100101010.001001010)2=(12452.112)8

So, the octal number of the hexadecimal number 152A.25 is 12452.112

Fixed Point and Floating Point Number Representations


Digital Computers use Binary number system to represent all types of
information inside the computers. Alphanumeric characters are represented
using binary bits (i.e., 0 and 1). Digital representations are easier to design,
storage is easy, accuracy and precision are greater.
There are various types of number representation techniques for digital
number representation, for example: Binary number system, octal number
system, decimal number system, and hexadecimal number system etc. But Binary
number system is most relevant and popular for representing numbers in
digital computer system.

Storing Real Number


These are structures as following below −
There are two major approaches to store real numbers (i.e., numbers with
fractional component) in modern computing. These are (i) Fixed Point Notation
and (ii) Floating Point Notation. In fixed point notation, there are a fixed
number of digits after the decimal point, whereas floating point number allows
for a varying number of digits after the decimal point.

Fixed-Point Representation −
This representation has fixed number of bits for integer part and for fractional
part. For example, if given fixed-point representation is IIII.FFFF, then you can
store minimum value is 0000.0001 and maximum value is 9999.9999. There
are three parts of a fixed-point number representation: the sign field, integer
field, and fractional field.

We can represent these numbers using:

• Signed representation: range from -(2(k-1)-1) to (2(k-1)-1), for k bits.


• 1’s complement representation: range from -(2(k-1)-1) to (2(k-1)-1), for k bits.
• 2’s complementation representation: range from -(2(k-1)) to (2(k-1)-1), for k bits.
2’s complementation representation is preferred in computer system because of
unambiguous property and easier for arithmetic operations.
Example −Assume number is using 32-bit format which reserve 1 bit for the
sign, 15 bits for the integer part and 16 bits for the fractional part.
Then, -43.625 is represented as following:

Where, 0 is used to represent + and 1 is used to represent. 000000000101011


is 15 bit binary value for decimal 43 and 1010000000000000 is 16 bit binary
value for fractional 0.625.

The advantage of using a fixed-point representation is performance and


disadvantage is relatively limited range of values that they can represent. So,
it is usually inadequate for numerical analysis as it does not allow enough
numbers and accuracy. A number whose representation exceeds 32 bits would
have to be stored inexactly.
These are above smallest positive number and largest positive number which
can be store in 32-bit representation as given above format. Therefore, the
smallest positive number is 2-16 ≈ 0.000015 approximate and the largest
positive number is (215-1)+(1-2-16)=215(1-2-16) =32768, and gap between
these numbers is 2-16.
We can move the radix point either left or right with the help of only integer
field is 1.

Floating-Point Representation −
This representation does not reserve a specific number of bits for the integer
part or the fractional part. Instead it reserves a certain number of bits for the
number (called the mantissa or significand) and a certain number of bits to
say where within that number the decimal place sits (called the exponent).

The floating number representation of a number has two part: the first part
represents a signed fixed point number called mantissa. The second part of
designates the position of the decimal (or binary) point and is called the
exponent. The fixed point mantissa may be fraction or an integer. Floating -
point is always interpreted to represent a number in the following form: Mxre.
Only the mantissa m and the exponent e are physically represented in the
register (including their sign). A floating-point binary number is represented
in a similar manner except that is uses base 2 for the exponent. A floating-
point number is said to be normalized if the most significant digit of the
mantissa is 1.

So, actual number is (-1)s(1+m)x2(e-Bias), where s is the sign bit, m is the


mantissa, e is the exponent value, and Bias is the bias number.
Note that signed integers and exponent are represented by either sign
representation, or one’s complement representation, or two’s complement
representation.

The floating point representation is more flexible. Any non-zero number can
be represented in the normalized form of ±(1.b1b2b3 ...)2x2n This is
normalized form of a number x.
Example −Suppose number is using 32-bit format: the 1 bit sign bit, 8 bits for
signed exponent, and 23 bits for the fractional part. The leading bit 1 is not
stored (as it is always 1 for a normalized number) and is referred to as a “hidden
bit”.
Then −53.5 is normalized as -53.5=(-110101.1)2=(-1.101011)x25 , which is
represented as following below,

Where 00000101 is the 8-bit binary value of exponent value +5.

Note that 8-bit exponent field is used to store integer exponents -126 ≤ n ≤
127.

The smallest normalized positive number that fits into 32 bits is


(1.00000000000000000000000)2x2-126=2-126≈1.18x10-38 , and largest
normalized positive number that fits into 32 bits is
(1.11111111111111111111111)2x2127=(224-1)x2104 ≈ 3.40x1038 . These
numbers are represented as following below,

The precision of a floating-point format is the number of positions reserved for


binary digits plus one (for the hidden bit). In the examples considered here
the precision is 23+1=24.

The gap between 1 and the next normalized floating-point number is known
as machine epsilon. the gap is (1+2-23)-1=2-23for above example, but this is
same as the smallest positive floating-point number because of non-uniform
spacing unlike in the fixed-point scenario.
Note that non-terminating binary numbers can be represented in floating point
representation, e.g., 1/3 = (0.010101 ...)2 cannot be a floating-point number
as its binary representation is non-terminating.
IEEE Floating point Number Representation −
IEEE (Institute of Electrical and Electronics Engineers) has standardized
Floating-Point Representation as following diagram.

So, actual number is (-1)s(1+m)x2(e-Bias), where s is the sign bit, m is the


mantissa, e is the exponent value, and Bias is the bias number. The sign bit is
0 for positive number and 1 for negative number. Exponents are represented
by or two’s complement representation.
According to IEEE 754 standard, the floating-point number is represented in
following ways:

• Half Precision (16 bit): 1 sign bit, 5 bit exponent, and 10 bit mantissa
• Single Precision (32 bit): 1 sign bit, 8 bit exponent, and 23 bit mantissa
• Double Precision (64 bit): 1 sign bit, 11 bit exponent, and 52 bit mantissa
• Quadruple Precision (128 bit): 1 sign bit, 15 bit exponent, and 112 bit mantissa

You might also like