Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science 1000 Digital Circuits. Digital Information computers store and process information using binary as we’ve seen, binary affords us similar.

Similar presentations


Presentation on theme: "Computer Science 1000 Digital Circuits. Digital Information computers store and process information using binary as we’ve seen, binary affords us similar."— Presentation transcript:

1 Computer Science 1000 Digital Circuits

2 Digital Information computers store and process information using binary as we’ve seen, binary affords us similar advantages as other representations e.g. we saw how we could add binary numbers, just as we add decimal numbers

3 Binary Representation recall that the way in which information is represented depends on the component RAM: capacitor charge hard drive: magnetic fields processor: voltages for our purposes, the most important point to remember is that there are exactly two states binary numbers: 1 0 logic: true false gate input/outputs: on off your text refers to such a binary system as a PandA representation, where information is made up of states that are Present and Absent

4 PandA from pg. 198 of your text

5 Processing your CPU processes information what does that mean? one possible definition: create a new state (output) from an existing state (input) by state, I am referring to a binary sequence Input 120 5 Processing Output

6 Processing – Example consider our addition example from the previous lecture 1011 +0010 1101 Input (Existing State) Output (New State)

7 0010 Processing – Example what we require is a device that can: take two binary numbers as input produces their sum as output in fact, this is (part of) what the arithmetic logic unit (ALU) in your processor does the question is: how? 1101 1011 Binary Adder 0010 1011

8 Logic Gates at a very basic level, processors are constructed using gates a logic gate is a very simple device: has a number of inputs produces a single output think of each input as a wire that is either on or off on represents a 1 in binary, or a true in logic off represents a 0 in binary, or a false in logic

9 Logic Gates - Continued the output of a logic gate depends on (and only on) its inputs in other words, for each possible combination of its inputs, there is a specific output we represent this using a truth table the truth table of a gate depends on its type

10 Not Gate one of the simplest gate types also known as an inverter takes one input, and produces a single output symbol: InputOutput

11 Not Gate a not-gate simply inverts its input that is if its input wire is on, its output is off if its input wire is off, its output is on hence, the truth table is constructed as follows: InputOutput onoff on 0 1 1 0

12 Truth Table Representation in the interest of space, on and off in truth tables are often represented as 1 and 0 hence, our previous truth would be written as follows: unless otherwise stated, this will be the representation that we adopt InputOutput 01 10

13 AND Gate an example of a gate with two inputs its output is on only if both of its inputs are on otherwise, the output is off Symbol: ABOutput 000 010 100 111 Truth Table:

14 Truth Table – Multiple Inputs note that our truth table now has four rows one for each possible configuration of inputs suppose we had a gate with three inputs how many rows would that require? ABCOutput 000 001 010 011 100 101 110 111 In general, any circuit with n binary inputs will require 2 n rows in its truth table.

15 Digital Circuits by themselves, gates are quite limited in what they do there are only so many uses for an AND gate the real power of gates is when we begin to combine them that is, the output of one gate becomes the input to another gate

16 Digital Circuits Example: suppose we have a NOT gate and an AND gate we could connect them in the following configuration notice that we still have two inputs (A,B) and one output the output of the not gate is attached to the first input of the AND gate

17 Digital Circuits Example: what does the truth table of our circuit look like? to determine this, let’s consider each input state individually ABOutput 00 01 10 11

18 Digital Circuits Example: when A is 0 and B is 0 the output of the not gate is 1 hence, the input to our AND gate is 1 and 0 the output of our AND gate is 0 ABOutput 00 01 10 11 0 0 1 0 0

19 Digital Circuits Example: when A is 0 and B is 1 the output of the not gate is 1 hence, the input to our AND gate is 1 and 1 the output of our AND gate is 1 ABOutput 00 01 10 11 0 1 1 1 0 1

20 Digital Circuits Example: when A is 1 and B is 0 the output of the not gate is 0 hence, the inputs to our AND gate are 0 and 0 the output of our AND gate is 0 ABOutput 00 01 10 11 1 0 0 0 0 1 0

21 Digital Circuits Example: when A is 1 and B is 1 the output of the not gate is 0 hence, the inputs to our AND gate are 0 and 1 the output of our AND gate is 0 ABOutput 00 01 10 11 1 1 0 0 0 1 0 0

22 Digital Circuit previous example demonstrated a digital circuit an assembly of logic gates like logic gates, each digital circuit has: input(s) output(s) a truth table like logic gates, digital circuits can be used in the construction of other circuits output from one circuit connected to another digital circuit

23 Digital Circuit - Rendering circuits are often rendered in an enclosed shape this makes it clear what the inputs and outputs to the system are

24 Digital Circuit - Rendering in fact, if we know the inputs, outputs, and truth table, then we often are not concerned with how the circuit is built becomes a “black box” handy when this circuit is used as part of a larger circuit ABOutput 000 011 100 110

25 Digital Circuit – Example 2 suppose I rearrange my previous circuit into the following configuration what would the truth table of this circuit be?

26 Digital Circuit – Example 2 Answer (discussed in class): ABOutput 001 011 101 110

27 Digital Circuit – Solving our circuits so far are reasonably small, and therefore easy and quick to derive truth table step through each individual configuration of the inputs however, as circuits grow, this task becomes more difficult and time consuming

28 Digital Circuit – Solving as a consequence, it is often helpful to label intermediate points in the circuit, and solve for those points explicitly in the truth table usually, these intermediate points are the output from a gate that are being input into another gate consider our previous example let’s label the output of the NOT gate as point C C

29 Digital Circuit – Solving now, when we create our truth table, we will create an “output” column for C as well although this might initially seem like more work, it will ultimately make computing the output easier C ABCOutput 00 01 10 11

30 Digital Circuit – Solving compute the values for column C C ABCOutput 00 01 10 11 ABC 001 011 100 110

31 Digital Circuit – Solving now, compute the values for the output column notice that the output depends only on C and B we need not even consider A the output is 1 if C and B are 1, and 0 otherwise C ABCOutput 00 01 10 11 ABC 001 011 100 110 ABC 0010 0111 1000 1100

32 OR Gate another common example of a gate with two inputs its output is off only if both of its inputs are off otherwise, the output is on notice how this contrasts with and Symbol: ABOutput 000 011 101 111 Truth Table:

33 Digital Circuit suppose we replace the AND gate in our previous circuit with an OR gate compute the resulting truth table for the output ABOutput 00 01 10 11

34 Digital Circuit first, to simplify our computation, let’s add an intermediate point at the NOT gate call it C C will require a column in the truth table ABOutput 00 01 10 11 C ABC 00 01 10 11

35 Digital Circuit now, let’s calculate the values for column C C ABCOutput 00 01 10 11 ABC 001 011 100 110

36 Digital Circuit now, we can calculate the values for the output based on columns B and C recall our definition for the OR gate – the output is off if both of its inputs are off, and on otherwise C ABCOutput 00 01 10 11 ABC 001 011 100 110 ABC 0011 0111 1000 1101


Download ppt "Computer Science 1000 Digital Circuits. Digital Information computers store and process information using binary as we’ve seen, binary affords us similar."

Similar presentations


Ads by Google