 # Engineering Lecture 3 Digital Electronics by Jaroslaw Karcz.

## Presentation on theme: "Engineering Lecture 3 Digital Electronics by Jaroslaw Karcz."— Presentation transcript:

Engineering Lecture 3 Digital Electronics by Jaroslaw Karcz

1. BASIC LOGIC CONCEPTS 2. COMBINATIONAL LOGIC 3. SEQUENTIAL LOGIC Overview

Analogue Signals 1.BASIC LOGIC CONCEPTS Representation of a quantity that varies over a continuous range of values e.g. sound, light, temperature, and pressure These may be represented electrically by an analogue voltage/current A device that is used to convert an analogue signal into an analogue voltage or current is known as a transducer

Digital Signals Representation of a quantity that varies in discrete steps over a range of values

Logic States Digital Electronics = circuits in which only 2 states possible at any point e.g. transistor can either be in saturation or be non-conducting Choose to talk about voltages, calling a level HIGH or LOW Depending on context, can be represented as following for example:  one bit (binary digit) of a number (0 or 1)  whether switch is opened or closed  whether signal is present or absent  some analogue level is above/below some preset limit (threshold)  whether some event has occurred yet  whether some action should be performed  etcetera…. HIGH and LOW states represent the TRUE and FALSE states of Boolean logic, in some predefined way Digital Electronics = circuits in which only 2 states possible at any point e.g. transistor can either be in saturation or be non-conducting Choose to talk about voltages, calling a level HIGH or LOW Depending on context, can be represented as following for example:  one bit (binary digit) of a number (0 or 1)  whether switch is opened or closed  whether signal is present or absent  some analogue level is above/below some preset limit (threshold)  whether some event has occurred yet  whether some action should be performed  etcetera….

Analogue to Digital Conversion In real world, signals appear in analogue form. It is often desirable to convert continuous (analogue) data to digital (discrete) form Conversion to digital format requires definition of threshold values e.g. in electronics, the voltage levels corresponding to HIGH or LOW are allowed to fall in some range Typical LOW- and HIGH-state output voltages are usually within a tenth of a volt of 0 and +5 volts, respectively

2.COMBINATORIAL LOGIC Circuits composed of combinations of logic gates, with NO FEEDBACK from outputs to inputs

Gates and Truth Tables - BASIC The AND gate IEEE /ANSI SymbolOlder (Mil-Spec) Symbol 111 001 010 000 Output FInput YInput X Output is HIGH (1) if and only if all inputs are HIGH (1). If any input(s) are LOW (0), the output is guaranteed to be in a LOW state

..\Pictures\Digital Gates\or.gif The OR gate Gates and Truth Tables 111 101 110 000 Output FInput YInput X Output will be HIGH (1) if any of the inputs are HIGH (1) Output goes LOW (0) if and only if all inputs are LOW (0). The OR gate Gates and Truth Tables 111 101 110 000 Output FInput YInput X The OR gate Gates and Truth Tables Output will be HIGH (1) if any of the inputs are HIGH (1) Output goes LOW (0) if and only if all inputs are LOW (0). 111 101 110 000 Output FInput YInput X The OR gate Gates and Truth Tables - BASIC

Whatever logical state is applied to the input, the opposite state will appear at the output The NOT gate (inversion) Gates and Truth Tables - BASIC 01 10 Output FInput X Also denoted as X’ – inverse of X

Gates and Truth Tables - DERIVED The NAND gate 011 101 110 100 Output FInput YInput X With the gate shown above, both inputs must have logic 1 signals applied to them in order for the output to be a logic 0. With either input at logic 0, the output will be held to logic 1. (derived from AND & NOT gates)

Gates and Truth Tables - DERIVED The NOR gate (same principle applies) 011 001 010 100 Output FInput YInput X NOR gate is an OR gate with the output inverted Where OR gate allows the output to be HIGH (1), if any input is true, the NOR gate inverts this and forces the output to logic 0 (LOW).

Gates and Truth Tables – still more?? The XOR gate The XNOR gate 011 101 110 000 Output FInput YInput X 111 001 010 100 Output FInput YInput X Output HIGH when inputs are inverses of each other Output HIGH when inputs are exactly the same

3.SEQUENTIAL LOGIC Use of devices in such a manner that the new state of an output may depend not only on the existing state of its inputs, but also on previous conditions imposed upon the inputs. In other words, capacity for MEMORY This allows for construction of devices such as:  Counters  Arithmetic Accumulators  Frequency Dividers, etc. The most fundamental unit of sequential logic is the FLIP-FLOP

Operation of NAND Gate Flip-Flop “Setting the latch” The time sequence displays the conditions under which the set (S) and reset (R) inputs cause a state change, and those for which they remain unaltered.

D Flip-flopDivide-by-2-Circuit Ripple-Down CounterFlip-flops

Flip-flops Q+ indicates the value of Q after the next clock pulse (output only changes upon a particular state of the clock pulse) – here PGT If J and K are different, Q takes on the value of J If J and K are both 0, Q remains unchanged If J and K are both 1, Q changes to its inverse (it "toggles") Information from J and K is read in on the rising edge of the clock, and is translated into action at the Q outputs on the FALLING edge of the clock Truth Table J-K Flip-flop

Applications of Flip-flops T-Flip Flop Synchronous Counter (created through use of T-flip flop : slightly modified J-K Flip-Flop)

A circuit which can store temporarily all bits of a binary number (a typical personal computer will have several 16-bit and 32-bit data registers in its arithmetic unit) Applications of Flip-flops Symbol “Anatomy” of Data Register composed of D Flip-flops 3-bit register Data Register