Logic CKT 01

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

Logic Circuits & Techniques

CHAPTER : 1
DIGITAL CONCEPTS & NUMBER SYSTEMS

 1.1 Digital & Analog Quantities


 1.2 Number systems, Codes & their conversions
 1.3 Binary Arithmetic
 1.4 1’s and 2’s Complement representation of Binary
Numbers
 1.5 Representation of Signed numbers in Computers

1
Logic Circuits & Techniques

 1.1 Digital & Analog Quantities

Digital Electronics involves quantities with discrete values & Analog


Electronics involves quantities with continuous values.

The Digital Advantage


Digital data can be processed and transmitted more efficiently and
reliably than analog data.
Digital data has better storage capabilities.
Noise does not affect digital data nearly as much as it does
analog signals.

Logic Levels & Bits


In digital circuits, two different voltage levels are used to
represent ON & OFF states . These voltage levels are called Logic levels . Ideally,
one logic level represents a HIGH and another voltage level represents a
LOW. Practically, a HIGH and a LOW can be any voltage between a specified
minimum and a specified maximum.
These logic levels are represented by either a ‘0 ‘ or a ‘1’ called bits . Bit is an
abbreviation of the words binary digit.

Digital Waveforms
Logic Circuits & Techniques

Digital waveforms consist of logic levels that are changing back


and forth between the HIGH and LOW levels or states. A positive-going pulse is
generated when the voltage goes from its normally LOW level to its HIGH
level and then back to LOW level. A negative-going pulse is the opposite. A
digital waveform is made up of a series of pulses.
A pulse has two edges: a leading edge that occurs first and a
trailing edge that occurs last. For the positive-going pulse, the leading edge is
the rising edge and the trailing edge is the falling edge.

The Clock
In digital systems, all circuits are synchronized with a basic timing
waveform called the clock. The clock is a periodic waveform in which
each interval between pulses equals the time for one bit.

1.2 Number systems & Codes :

Number Systems are

1. Decimal number system (Base 10)


2. Binary number system (Base 2)
3. Octal number system (Base 8)
4. Hexadecimal number system (Base 16)

 All these number systems are positional number systems,


which means the value of a digit is determined by its
position in the number.

A subscript is included after a number in each number


system to indicate the base of the number (e.g.65.8910 is a
base 10 number)
Logic Circuits & Techniques

The Decimal Number System


This number system has 10 digits ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9) which
means that this is a base 10 number system .

The Binary Number System

This number system has 2 digits (0, 1) called bits which means that
this is a base 2 number system.
n
Generally an n bit binary number can count from 0 to 2 – 1.
The weighting structure of a mixed binary number (containing integer
part and fractional part) is
n-1 3 2 1 0 -1 -2 -m n-1 3 2 1 0
2 ...2 2 2 2 .2 2 ...2 where 2 . . . 2 2 2 2 are the
-1 -2 -m
place values of the different digits in the integer part and 2 2 . . . 2 are the
place values of the different digits in the fractional part, each starting from the
binary point.
The rightmost bit is the LSB (Least Significant Bit) and the leftmost bit is
the MSB (Most Significant Bit).

Number conversion problems :


(i) Binary to decimal conversion :
The general method is to multiply by powers of 2 and then add.
Example :
Find the decimal equivalent of the binary number 1001.01012
Solution :
Here we have an integer part and a fractional part:
The integer part is 10012 . Its decimal equivalent is 1 X 20 + 0 X 21 + 0 X 22 + 1 X 23
= 1+0+0+8=9
Similarly the fractional part is .0101. Its decimal equivalent is 0 X 2 -1 + 1 X 2-2 + 0
X 2-3 + 1 X 2-4 = 0 + 0.25 + 0 + 0.0625 = 0.3125.
Therefore the decimal equivalent of 1001.01012 = 9 + 0.3125 = 9.312510
Logic Circuits & Techniques

Exercises :
Convert the following binary numbers to decimal numbers :
(a) 11011012 (b) 100100012 (c) 0.10112 (d) 1010 . 1112
(e) 0011002 (f) 111100011112 (g) 11100. 0112 (h) 1110. 1012

Answers: (a) 10910 (b) 14510 (c) 0.687510 (d) 10.87510


(e)1210 (f) 193510 (g) 28.37510 (h) 14.62510

(ii) Decimal to binary conversion :


The integer and fractional parts are to be worked out separately.
 Integer part : Perform successive (repeated) division of the integer
part by 2 and note down the remainders until the quotient becomes
‘0’. Then the remainders are written in reverse order to obtain the
binary equivalent of the integer part.
 Fractional part : Perform successive (repeated) multiplication of the
fractional part by 2 and note down the carry until the result of the
multiplication becomes ‘0’. Then the carries are written in forward
order to obtain the binary equivalent of the fractional part.
Note : In some cases, the result of multiplication may not become 0 for
the fractional part. Then the process may be stopped after getting the
required number of bits for the fractional part.
This method of decimal to binary conversion is popularly known as the
double-dabble method.
Example :
Find the binary equivalent of the decimal number 13.37510
Solution :
(a) The integer part is 13. Perform successive division of 13 by 2 till the
remainder becomes 0. Write the remainders in reverse order.
(b) The fractional part is 0.375. Perform successive multiplication of 0.375 by
2 till the result of multiplication becomes 0. Write the carries in forward
Logic Circuits & Techniques
order.

(a) Integer part (b) Fractional part

Therefore the binary equivalent of 13.37510 = 1101. 0112


Exercises :
Convert the following decimal numbers to binary numbers :
(a) 7410 (b) 567 10 (c) 0.8437510 (d) 20.24 10 (e)
14.62510 (f) 50010 (g) 27.187510 (h)51.5937510

Answers: (a)10010102 (b) 1000110112 (c) 0.110112


(d) 10100. 00111101…… (e) 1110.1012 (f) 1111101002
(g) 11011. 00112 (h) 110011. 100112

The Hexadecimal Number System

This number system has 16 digits ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F)


which means that this is a base 16 number system.

Number conversion problems :


(iii) Hexadecimal to Decimal conversion :
Logic Circuits & Techniques

The general method is to multiply by powers of 16 and then add.


Example :
Find the decimal equivalent of the Hex number A0F9 . 0EBH
Solution :
The decimal equivalent of the integer part A0F9 is
9 X 160 + 15 X 161 + 0 X 162 + 10 X 163 = 9 + 240 + 0 + 40960 = 41209
The decimal equivalent of the fractional part 0.0EB is
0 X 16-1 + 14 X 16-2 + 11 X 16-3 = 0 + 0.0547 + 0.0027 = 0.0574
Therefore the decimal equivalent of A0F9 . 0EBH = 41209 . 057410
Exercises :
Convert the following Hex numbers to decimal numbers:
(a) 5C7H (b) ABCDH (c) 37.69H (d) 1E0.2AH

Answers:
(a) 147910 (b) 4398110 (c) 55. 410210 (d) 480.16410

(iv) Decimal to Hexadecimal conversion :


This is similar to decimal –to-binary conversion method except that that the
successive (repeated) division of the integer part and the successive (repeated)
multiplication of the fractional part are performed by 16 and not by 2.

Example :
Find the Hexadecimal equivalent of the decimal number 2598. 6510
Solution :
Logic Circuits & Techniques

(a) Integer part (b) Fractional part

Therefore 2598. 6510 = A26 . A66…..H


Note :
 10 = AH
 In the fractional part of this problem, the result of multiplication does not
become 0, so the process is stopped after getting the required number of
Hex digits.

Exercises :
Convert the following decimal numbers to Hex numbers:
(a) 4910 (b) 25510 (c) 42.5210
(d) 2500.675 10 (e)10110

Answers:
(a) 31H (b) FFH (c) 2A. 851EB…..H
(d) 9C4. ACC…..H (e) 65H

(v) Binary to Hexadecimal conversion :

Each Hexadecimal digit is obtained by grouping binary bits in groups of 4 bits


starting from the binary point.
Logic Circuits & Techniques

Example :

Convert the binary number 10110.110112 to a Hexadecimal number

Solution :

Note :
 Note that zeros are added on either side of the given binary number so as to complete
4 bits in the outside groups.
 The subscript ‘H’ is sometimes used for Hexadecimal numbers.

Exercises :

Convert the following binary numbers to Hexadecimal numbers:


(a)11001010010101112 (b) 1100111010002 (c) 101010. 101012
(d) 1111110001.011010012 (e) 1011001110. 0110111012

Answers:
(a) CA57H (b) CE8H (c) 2A.A8H
(d) 3F1.69H (e) 2CE. 6E8H

(vi) Hexadecimal to binary conversion :


Here the reverse process is carried out . So write each Hexadecimal digit in the
given Hex number as a 4-bit binary number.

Example :
Convert the Hex number 29.643H to a binary number

Solution :
Logic Circuits & Techniques
So the answer is 101001 . 0110010000112

(Note that the leading zeros are removed from the final answer as it does not change the value.)
Exercises :
Convert the following Hex numbers to binary numbers:
(a) 10A4H (b) CF8EH (c) 6BD3H (d) 9742H (e) 2CE. 6E8H

Answers:
(a)10000101001002 (b)11001111100011102 (c) 1101011110100112
(d) 10010111010000102 (e) 1011001110. 0110111012

BCD

BCD means Binary Coded Decimal. The decimal digits 0 through 9 can be
coded (represented) using a 4 bit binary code .
The BCD equivalent of a decimal number is written by replacing each decimal
digit in the integer and fractional parts of the decimal number with its 4-bit
binary equivalent.
Example :
Write the BCD equivalent of 24. 3610 :
Solution :
24. 3610 = (0010 0100 . 0011 0110) BCD

Exercises:
Write the BCD equivalent of the following decimal numbers:
(a) 1210 (b) 13410 (c) 455610 (d) 345. 7910
Answers:

(a) 0001 0010 (b) 0001 0011 0100 (c) 0100 0101 0101 0110
(d) 0011 0100 0101 . 0111 1001

BCD to binary and Binary to BCD conversions:


Logic Circuits & Techniques
(a) BCD to binary conversion:

A BCD number can be converted to an equivalent binary number by first writing


its decimal equivalent and then converting the decimal into its binary equivalent:

Example : Find the binary equivalent of the BCD number


0010 1001 . 0111 0101

Solution : (0010 1001 . 0111 0101) BCD = 29 . 7510


Now find the binary equivalent of 29. 7510 .
29.7510 can be converted to binary as 11101 . 112
Therefore (0010 1001 . 0111 0101) BCD = 11101 . 112

(b) Binary to BCD conversion:

This is the reverse process of that done in (a). So first convert the binary number
to a decimal number and then write its BCD equivalent:

Example : Find the BCD equivalent of the binary number 10101011.1012

Solution : We can first convert the above binary number to a decimal number

as 10101011.1012 = 171.62510
Therefore the BCD equivalent of the above decimal number is
171.62510 = (0001 0111 0001 . 0110 0010 0101)BCD

Some commonly used terms in Computer terminology and their inter


-relationships :

1 nibble = 4 bits
1 Byte = 8 Bits
1 Word = 16 bits
1 long word = 32 bits
10
1 kilo byte = 2 bytes
20
1 Mega byte = 2 bytes
30
1 Giga byte = 2 bytes
Biggest 1 byte hex number is = 1111 1111 = FF16
Smallest 1 byte hex number is = 00
Biggest 1 byte octal number is = 1111 1111= 3778
Logic Circuits & Techniques

 1.3 Binary Arithmetic

Binary Addition :

The four (4) basic rules for adding binary digits ( bits ) are as follows:

(i) 0 + 0 sum= 0 ; carry = 0


(ii) 0 +1 sum= 1 ; carry = 0
(iii) 1 + 0 sum = 1 ; carry = 0
(iv) 1 + 1 sum = 0 ; carry = 1

When there is a carry of 1, the three bits are being added as follows:

1 +0 +0 sum = 1 ; carry = 0
1 +0 +1 sum = 0 ; carry = 1
1 +1 +0 sum = 0 ; carry = 1
1 +1 +1 sum = 1 ; carry = 1

4 bits are added as follows :

1+1+1+1 = 10 + 1+1 = 11 + 1 = 0 with a carry of 10

Perform the following binary addition:

a) 11 + 11

b) 11111 + 1000 

c) 111101 + 1011010

d) 1101.110 + 1010.110011 
Binary Subtraction :

The four rules for subtracting the binary numbers are as follows:

(i) 0–0 difference = 0 ; borrow = 0


(ii) 0–1 difference = 1 ; borrow = 1
(iii) 1–0 difference = 1 ; borrow = 0
(iv) 1–1 difference = 0 ; borrow = 0

Perform the following binary subtractions:


a) 11 – 01

b) 1001 – 0111
Logic Circuits & Techniques
c) 1100101 – 101110

d) 1010. 01 – 111.111

Binary Multiplication

The four basic rules for multiplying binary numbers are as follows:

0 x0 =0
0 x1 =0
1 x0 =0
1 x1 =1

Perform the following binary multiplications:

a) 101 x 111

b) 110 x 111

c) 101101 x 1010

d) 1011. 101 x 101.01

Binary Division:

Division in binary follows the same procedure as division in decimal:


A long division procedure can be used:

Divide 1011012 by 1102 ; where 1102 is the Divisor & 1011012 is the
Dividend

Procedure for Long Division is illustrated below:


1 1 0 













Logic Circuits & Techniques

So the Quotient is & the reminder is 0

Exercise : Perform the following binary Divisions :


a) 110101 by 111

b) 110101. 11 by 101

 1.4 1’s and 2’s Complement representation of Binary


Numbers
1’s Complement representation :

To get the 1’s complement of a binary number, change all 1’s to 0’s and all
0’s to 1’s.

Find the 1’s complement of the following binary numbers:


a) 10110010

b) 00011010

c) 11110111

d) 0001.101

2’s Complement representation :

To get the 2’s complement of a binary number, add 1 to the LSB of the 1’s
complement of the given number.

Find the 2’s complement of the following binary numbers:


Logic Circuits & Techniques
a) 10110010

b) 00010110

c) 1111.100

 1.5 Representation of Signed (+ve & -ve ) numbers


 in Computers

 Sign bit is the leftmost bit in a signed binary number.


 When the sign bit is ‘0’, it is a positive binary number.
 When the sign bit is ‘1’, it is a negative binary number.

There are three methods for representing signed numbers in computers :

(i) Signed Magnitude form:


In this method the Leftmost bit indicates the sign bit
( ‘0’ for positive & ‘1’ for negative numbers ) & the remaining bits indicate
the magnitude.
Example : +51 = 0 110011 - 51 = 1 110011

Convert the following decimal numbers into signed binary numbers using the
sign-magnitude form method:
a) +68 (b) +100 (c) -12 (d) -89

(ii) 1’s complement form:

In 1’s complement form, a negative number is the 1’s


complement form of the corresponding positive number.

Example : +51 = 0 110011 - 51 = 1 0 0 1 1 0 0 (1’s complement)


Logic Circuits & Techniques

Convert the following decimal numbers into signed binary numbers using the
1’s complement form method:

a) +68 (b)+100 (c) -12 (d) -89

(iii) 2’s complement form:

In 2’s complement form, a negative number is the 2’s


complement form of the corresponding positive number.
Example : +51 = 0 110011

-51 = 1 0 0 1 1 0 0 (1’s complement)


+ 1
--------------------
1 0 0 1 1 0 1 (2’s complement)
--------------------

Convert the following decimal numbers into signed binary numbers using the
2’s complement form method:

a) +68 (b) +100 (c) -12 (d) -89

Note : From the above examples, you may have noted one point :
A positive number has the same representation in all the three forms, but a
negative number has different representations.

References :

(1) Roger L. Tokheim : ‘Digital Principles ‘, Schaum’s outline Series,

Mc GrawHill.

(2) Anil K. Maini : ‘Digital Electronics : Principles, Devices &


Logic Circuits & Techniques
Applications’, John Wiley & Sons Ltd., England.

(3) Floyd T.L. : ‘Digital Fundamentals’ Pearson International Edition,

USA.

(4) A. Anand Kumar :’ Fundamentals of Digital Circuits’, PHI, India.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy