Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ch. 10 – Fundamentals of Logic Circuits So far, the circuits we’ve discussed were analog circuits, meaning that circuit parameters such as voltage and.

Similar presentations


Presentation on theme: "Ch. 10 – Fundamentals of Logic Circuits So far, the circuits we’ve discussed were analog circuits, meaning that circuit parameters such as voltage and."— Presentation transcript:

1 Ch. 10 – Fundamentals of Logic Circuits So far, the circuits we’ve discussed were analog circuits, meaning that circuit parameters such as voltage and current were continuous quantities. 1

2 What would happen if we sample the instantaneous value at specific times? Then we would get a series of discrete values that approximate the continuous quantity. 2

3 Discrete values that approximate [represent] continuous functions lead to the concept of a digital circuit. The simplest digital circuits consist of two possible signal values. These circuits are binary in nature, and are represented with binary numbers. 3

4 Number Systems We commonly use a decimal, or Base 10, number system. Why? It turns out that the number 10 does not have very nice mathematical properties. It is rather difficult and awkward to implement a digital circuit based on the number 10. 4

5 Number Systems A power of the number 2 (the number of binary states) works much better. 2, 4, 8, 16, 32, 64, … We will look at two of these number systems in some detail: Base 2 (binary) and Base 16 (hexadecimal) We’ll compare/contrast them with the good old (but mathematically awkward) Base 10 (decimal) system. 5

6 Number Systems The decimal, binary, and hexadecimal number systems are place-valued number systems, where each digit takes on a weighting based on the place within the number that it appears. Not all number systems are place valued. Some are based on combinations of numerals. © MCMLXIV I = 1 V = 5 X = 10 L = 50 C = 100 D = 500 M = 1000 6

7 Number Systems In Base 10, we have the following place values: 10 0 10 1 10 2 10 3 10 -1 10 -2 10 -3 1000s100s10s1s 1/10th 1/100th 1/1000th. 435.61 4  10 2 3  10 1 5  10 0 6  10 -1 1  10 -2 = 400 = 30 = 5 = 0.6 = 0.01 435.61 In Base 10, we have the digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. 7

8 Number Systems In Base 2, we have the following place values: 2020 21212 2323 2 -1 2 -2 2 -3 8s4s2s1s 1/2th 1/4th 1/8th. 110.01 1  2 2 1  2 1 0  2 0 0  2 -1 1  2 -2 = 4 = 2 = 0 = 0.25 6.25 In Base 2, we have the digits: 0 and 1. 8

9 Number Systems In Base 16, we have the following place values: 16 0 16 1 16 2 16 3 16 -1 16 -2 16 -3 4096s256s16s1s 1/16th 1/256th 1/4096th. 6C3.DA 6  16 2 12  16 1 3  16 0 13  16 -1 10  16 -2 = 1536 = 192 = 3 = 0.8125 = 0.0390265 1731.8515265 In Base 16, we have the digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9 A, B, C, D, E, and F.

10 Binary to decimal conversion: –Convert 10011 2 to decimal Decimal to binary conversion: –Convert 47 10 to binary Number Conversion

11 Binary to decimal conversion: –Convert 10011 2 to decimal –16×1 + 8×0 + 4×0 + 2×1 + 1×1 = 19 10 Decimal to binary conversion: –Convert 47 10 to binary –32×1 + 16×0 + 8×1 + 4×1 + 2×1 + 1×1 = 101111 2 Number Conversion

12 Converting Between Base 2 and Base 16 Since 16 = 2 4, we can group binary digits into groups of 4 binary digits (bits) and convert each group of 4 bits to hexadecimal (hex) separately. 1011 0010 1100 0111 8+2+1=11  22 8+4=12  4+2+1=7  B 2 C 7 (1011 0010 1100 0111) 2 = B2C7 16 12

13 2 0 = 2 1 = 2 2 = 2 3 = 2 4 = 2 5 = 2 6 = 2 7 = 2 8 = 2 9 = 2 10 = 2 11 = 2 12 = 2 13 = 2 14 = 2 15 = Powers of Two

14 2 0 = 1 2 1 = 2 2 2 = 4 2 3 = 8 2 4 = 16 2 5 = 32 2 6 = 64 2 7 = 128 Handy to memorize up to 2 9 2 8 = 256 2 9 = 512 2 10 = 1024 2 11 = 2048 2 12 = 4096 2 13 = 8192 2 14 = 16384 2 15 = 32768 Powers of Two

15 Converting Between Decimal, Hexa, and Binary 15

16 Binary Arithmetic Addition: 0 + 0 = 0 0 + 1 = 1 1 + 1 = 10 sum carry One’s Complement: Toggle each bit (make each “0” a “1” and each “1” a “0”) Number: 0110 1101 1’s Complement: 1001 0010 Two’s Complement: One’s Complement + 1 Number: 0110 1101 1’s Complement: 1001 0010 2’s Complement: 1001 0011 Subtraction: A – B = A + (– B) = A + (2’s Complement of B) OR 1 – 0 = 1 110 – 101 = 001 (Borrow) MSB of a 2’s Complement number is the sign bit (0=positive, 1=negative) 16

17 Binary Subtraction Example (Complement) 1001 0110 – 0010 0111 1’s Complement 1001 0110 – 1101 1000 2’s Complement 1001 0110 + 1101 1001 1 0110 1111 Check using Decimal Subtraction: 1001 0110 2 = 150 10 0010 0111 2 = 39 10 150 – 39 111 ignore 111 check 17

18 Binary Subtraction Example (Borrow) 110 – 101 Borrow from 1 11 0 0 10 – 1 0 1 Subtract 11 0 0 10 + 1 0 1 0 0 1 Check using Decimal Subtraction: 110 2 = 6 10 101 2 = 5 10 6 – 5 1 1 check 18


Download ppt "Ch. 10 – Fundamentals of Logic Circuits So far, the circuits we’ve discussed were analog circuits, meaning that circuit parameters such as voltage and."

Similar presentations


Ads by Google