Digital design chap 1

36
DIGITAL ELECTRONICS CHAPTER 1 DEE 204

description

digital design for diploma students

Transcript of Digital design chap 1

Page 1: Digital design  chap 1

DIGITAL ELECTRONICSCHAPTER 1

DEE 204

Page 2: Digital design  chap 1

DIGITAL ELECTRONICS• Information representation

Sign and magnitude.Complement number systems, addition, subtraction,

division, multiplication of binary numbers.Character coding ASCII, hexadecimal number systems.Hexadecimal.

• Digital fundamentalsDifference between analog and digital systems.Logic levels and families.Logic values, truth tables and logical operations.Boolean algebra.De Morgan’s Theorem

Page 3: Digital design  chap 1

DIGITAL ELECTRONICS• Function of combination logic

Conversion of BCD to 7 segment decoder.Multiplexer, tri-state output, fan out, address, half

adder, full adder, comparator.Logic minimisation and Karnaugh maps.

• Function of sequential logicSequential logic.Latches gated and edge-triggered S-R latch.Edge-trigged D-type latches.Toggle flip-flop.Asynchronous counters, registers.State machines. 

Page 4: Digital design  chap 1

DIGITAL ELECTRONICS• Memory organisation

Principles of storage, RAM, ROM, PROM, EPROM.Dynamic theory, logic diagram of a single bit within a

RAM and its operation.Coincident address selection.Block diagram of a single bit within a RAM and its

operation.

• Conversation between analoque and systems function of A-D and D-A Converters.Principle of operation of a D-A converter.Principle of operation of a single ramp.A continuously balanced and successive

approximation A-D converter.

Page 5: Digital design  chap 1

INFORMATION REPRESENTATION

Information representation- Number systems actually represent data

before they are processed by any digital system

- There are various number systems but all number systems are related to a common parameter

Page 6: Digital design  chap 1

INFORMATION REPRESENTATION

- Different characteristics define different number systems including number of independent digits place values of different digits maximum number able to be written in the

number system

• The most fundamental characteristic is the number of independent digits or symbols used in the number system known as radix or base

Page 7: Digital design  chap 1

INFORMATION REPRESENTATION

• the most familiar number system is the decimal system which has 10 independent digits or a radix of 10 the decimal number consists of 0,1,2,3,4,5,6,7,8,9

• the binary number system has only 2 independent digits, i.e. 0,1

• the octal and hexadecimal number system has 8 and 16 independent digits respectively octal: 0,1,2,3,4,5,6,7 hexadecimal: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

Page 8: Digital design  chap 1

INFORMATION REPRESENTATION

• the place value of different digits in the integer are given as rn, where r is the radix of the system and represents the maximum number that can be written with n digits:

24 23 22 21 20

=16 =8 =4 =2 =11 0 1 1 0= 101102 = 2210

Page 9: Digital design  chap 1

INFORMATION REPRESENTATION

Sign/magnitude notation • is the simplest and one of the most obvious

methods of encoding positive and negative numbers.– Assign the leftmost (most significant) bit to be

the sign bit. If the sign bit is 0, this means the number is positive. If the sign bit is 1, then the number is negative. The remaining m-1 bits are used to represent the magnitude of the binary number in the unsigned binary notation.

Page 10: Digital design  chap 1

INFORMATION REPRESENTATION

Sign/magnitude notation

Page 11: Digital design  chap 1

INFORMATION REPRESENTATION

Sign/magnitude notation

Example:Add 00101 + 00110 (+5 and +6) 00101+ 00110 ------- 01011 = +11 (decimal)

Page 12: Digital design  chap 1

INFORMATION REPRESENTATION

Sign/magnitude notationExample:Add +7 and –2 : +7 = 00111+2 = 00010, so flip the bits: 11101 and add 1: 11110

00111+ 11110 ------- 100101 Discard the extra carry to give 00101 = +5

Page 13: Digital design  chap 1

INFORMATION REPRESENTATIONSign/magnitude notationExample:Add –5 + -45 = 00101. Flip the bits to get 11010, and add 1 to get 110114 = 00100. Flip the bits to get 11011, and add 1 to get 11100

11011+ 11100 ---------- 110111 = 10111 when we discard the carry10111 is negative, as indicated by the leading 1.

Flip the bits to get 01000. Add 1 to get 01001. The result is 9. Since it is negative, we really have –9.

Page 14: Digital design  chap 1

INFORMATION REPRESENTATION

• 1's Complement ArithmeticThe Formula

N *= (2n -1) - Nwhere: n is the number of bits per word

• N is a positive integer• N* is -N in 1's complement notation• For example with an 8-bit word and N = 6, we

have:N* = (28 -1) - 6 = 255 - 6 = 249 = 111110012

Page 15: Digital design  chap 1

INFORMATION REPRESENTATION• In Binary

An alternate way to find the 1's complement is to simplytake the bit by bit complement of the binary number.For example: N = +6 = 000001102

N *= -6 = 111110012

Conversely, given the 1's complement we can find themagnitude of the number by taking it's 1's complement.The largest number that can be represented in 8-bit 1'scomplement is 011111112 = 127 = $7F. The smallest is

100000002 = -127. Note that the values 000000002 and

111111112 both represent zero.

Page 16: Digital design  chap 1

INFORMATION REPRESENTATION

• Addition   End-around Carry. 

When the addition of two values results in a carry, the carry bit is added to the sum in the

rightmost position. There is no overflow as long as the magnitude of the result is not greater than 2n-1.

Page 17: Digital design  chap 1

INFORMATION REPRESENTATION

• 2's Complement ArithmeticThe FormulaN ** = 2n - Nwhere: n is the number of bits per word

• N is a positive integer• N** is -N in 2's complement notation• For example with an 8-bit word and N = 6, we

have:N** = 28 - 6 = 256 - 6 = 250 = 111110102

Page 18: Digital design  chap 1

INFORMATION REPRESENTATION• In Binary

An alternate way to find the 2's complement is to start at the right and complement each bit to the left of the first "1".

For example: N = +6 = 000001102

N** = -6 = 111110102

Conversely, given the 2's complement we can find themagnitude of the number by taking it's 2's complement.The largest number that can be represented in 8-bit 2scomplement is 011111112 = 127. The smallest is

100000002 = -128.

Page 19: Digital design  chap 1

INFORMATION REPRESENTATION

• AdditionWhen the addition of two values results in a carry, the carry bit is ignored. There is no overflow as long as the magnitude is not greater than 2n-1 nor less than -2n.

Page 20: Digital design  chap 1

INFORMATION REPRESENTATION

Addition• Adding 1+1 = 1, with carry of ‘1’ to the left bit

Page 21: Digital design  chap 1

INFORMATION REPRESENTATIONAddition

Page 22: Digital design  chap 1

INFORMATION REPRESENTATION

Subtraction• Subtracting 0 – 1 = 1, with borrow of ‘1’ from

the left bit

Page 23: Digital design  chap 1

INFORMATION REPRESENTATIONSubtraction

Page 24: Digital design  chap 1

INFORMATION REPRESENTATION

Addition/Subtraction

     1101+     101______ 

    1001+    111______

     11110-    10110________

     1111101-    1101011_________

Page 25: Digital design  chap 1

INFORMATION REPRESENTATION

Division/Multiplication

11

X 11

11 11 1001

111

X 101

111 000+ 111 100011

Page 26: Digital design  chap 1

INFORMATION REPRESENTATION

Division/Multiplication

10

000

11

11011

11

000

010

010

10

110102

0

6

63

3

0

6

62

Page 27: Digital design  chap 1

INFORMATION REPRESENTATION

Division/Multiplication

* Division or multiplication of binary numbers could also be done by converting the value into decimal, divided or multiplied, and then converted back into binary 

Page 28: Digital design  chap 1

INFORMATION REPRESENTATION• Binary/octal/hexadecimal – decimal conversion

Example:(1101)2 in decimal

1X23 + 1X22 + 0X21 + 1X20 = 8 + 4 + 0 + 1 = 13

(234)8 in decimal

2X82 + 3X81 + 4X80 = 2X64 + 3X8 + 4X1= 128 + 24 + 4 = 156

Page 29: Digital design  chap 1

INFORMATION REPRESENTATION

• Binary/octal/hexadecimal – decimal conversionExample:(5B1)16 in decimal

5X162 + 11X161 + 1X160 = 5X256 + 11X16 + 1X1= 1280 + 176 + 1 = 1457

Page 30: Digital design  chap 1

INFORMATION REPRESENTATION

Conversion binary-octal-hexadecimal-decimalExample:Decimal – binary conversion of (13)10

Solution:In this case integer = 13

Page 31: Digital design  chap 1

INFORMATION REPRESENTATION

Solution:For the integer part = 13

Thus, binary equivalent of 13 = 1101

Page 32: Digital design  chap 1

INFORMATION REPRESENTATION

• Example:Decimal – octal conversion of (73)10

Solution:

integer = 73

Page 33: Digital design  chap 1

INFORMATION REPRESENTATION

• SolutionFor the integer part = 73

Thus, octal equivalent of 73 = 111

Page 34: Digital design  chap 1

INFORMATION REPRESENTATION

• Hexadecimal-octal-binary conversionExample:(1101111001101001)2 in octal

(1101111001101001)2 = 1571518

1 101 111 001 101 0012

001 101 111 001 101 001

1 5 7 1 5 1

Page 35: Digital design  chap 1

INFORMATION REPRESENTATION

• Hexadecimal-octal-binary conversionExample:(1101111001101001)2 in hexadecimal

(1101111001101001)2 = DE6916

1101 1110 0110 10012

1101 1110 0110 1001

13 14 6 9

D E 6 9

Page 36: Digital design  chap 1

INFORMATION REPRESENTATION

• ASCII code- stands for American Standard Code for Information Interchange - a seven bit code based on the English alphabet used to represent alphanumeric data in computers or communication equipment

- able to represent 128 characters: A to Z, a to z, 0 to 9, a few mathematical symbols, punctuation marks and space character