Download presentation
Presentation is loading. Please wait.
Published byClaude Black Modified over 9 years ago
1
1 CMSC 250 Chapter 1, con't., Combinatorial circuits
2
2 CMSC 250 Basic logic gates l An and gate: l An or gate: l A not gate:
3
3 CMSC 250 Discrete Structures CMSC 250 Lecture 6
4
4 CMSC 250 Combining & determining I/O relationship l From a circuit to a Boolean formula: l p ~(q ^ r) p q r
5
5 CMSC 250 Draw a circuit for: l p, q & r are inputs. l Simplify before building the circuit. pqroutput 1111 1101 1010 1001 0110 0100 0010 0000
6
6 CMSC 250 Number conversions l Different number system bases are used when convenient –some commonly-used bases are 10 (decimal), 2 (binary), 8 (octal), 16 (hexadecimal) –the base tells how many different numerals are used –the base also determines the value of each place l Conversions from anything to base 10 –use the definition of the number system l Conversions from base 10 to anything –use repeated integer division
7
7 CMSC 250 Addition of binary numbers l Carry if the number would be too large for the number system- if it is greater than 1 1001 +10 1001 +11 1011 +10 1101 +111
8
8 CMSC 250 Discrete Structures CMSC 250 Lecture 7
9
9 CMSC 250 Addition of octal and hexadecimal numbers l Carry if the number would be too large for the number system (larger than 7 or 15) 723 8 +12 8 265 8 +33 8 ABC 16 +12 16 CDE 16 +ED 16
10
10 CMSC 250 Two's complement l To represent negative values in binary: 1.Find the binary equivalent of the absolute value. 2.Pad on the left to completely fill the bits in the specified bit width 3.Switch all of the 1's to 0's and 0's to 1's. 4.Add 1 to the result. Example: find the 8-bit two's complement representation of -43: 1.43 10 = 101011 2 2.00101011 2 3.11010100 2 4.11010101 2 = -43 10
11
11 CMSC 250 Using a circuit for adding two bits l Write as a logic expression l Translate to circuits pqcarrysum 0000 0101 1001 1110 inputoutput
12
12 CMSC 250 Half adder p and q are binary values (1 bit each) sum = (p q) ^ ~(p ^ q) carry = (p ^ q) q p sum carry
13
13 CMSC 250 Full adder (for three bits) l p, q, and r are binary digits l p + q + r produces a sum value and a carry value half-adder #1 half-adder #2 p q r S1S1 C1C1 C S C2C2
14
14 CMSC 250 Parallel adders l Chain these half adders and full adders together for multi-bit addition l X 1 X 2 X 3 + Y 1 Y 2 Y 3 = CA 1 A 2 A 3 X3X3 Y3Y3 X2X2 Y2Y2 X1X1 Y1Y1 half-adder full-adder A3A3 carry A2A2 A1A1
15
15 CMSC 250 Discrete Structures CMSC 250 Lecture 8
16
16 CMSC 250 Draw a circuit for abcoutput 0000 0 0 0010 0 0 0 0 1 0100 0 0 1 0 0 0110 0 1 1000 1 0 0 0 0 1010 1 1 0 0 1 1101 0 0 1111 1 0 0 0 1
17
17 CMSC 250 Topic not covered Simplifying circuits- there are techniques which exist (which are complex).
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.