Sie sind auf Seite 1von 26

Positive and Negative Logic

Fig. Two graphic symbols for NOT gate

Integrated Circuits
An integrated circuit is a piece (also called a chip) of
silicon on which multiple gates have been embedded

These silicon pieces are mounted on a plastic or ceramic


package with pins along the edges that can be soldered
onto circuit boards or inserted into appropriate sockets

Integrated Circuits(Contd.)

SSI, MSI, LSI: They perform small tasks such as addition of few
bits. Have small memories, small processors
VLSI: Large memory - Complex microprocessors

Digital Circuits
Two main classes of circuits:
1. Combinational circuits
Circuits without memory
Outputs depend only on current input values
Example : Half adder, full adder, subtractor
2. Sequential Circuits (also called Finite State Machine)
Circuits with memory
Memory elements to store the state of the circuit
The state represents the input sequence in the past
Outputs depend on both circuit state and current inputs
Example : flip flops, counters, shift registers

COMBINATIONAL LOGIC
CIRCUITS
Half Adder
x y

0
0
1
1

0
0
0
1

0
1
1
0

0
1
0
1

Full Adder
x
0
0
0
0
1
1
1
1

y
0
0
1
1
0
0
1
1

cn-1
0
1
0
1
0
1
0
1

cn s
0 0
0 1
0 1
1 0
0 1
1 0
1 0
1 1

Other Combinational
Circuits

etc

Multiplexer
Encoder
Decoder
Parity Checker
Parity Generator

MULTIPLEXER
4-to-1 Multiplexer

Select
S1 S0
0
0
0
1
1
0
1
1

Output
Y
I0
I1
I2
I3

I0
I1
I2
I3
S0
S1

Decoder
Accepts a value and decodes it
Output corresponds to value of n inputs
Consists of:
Inputs (n)
Outputs (2n , numbered from 0 2n - 1)
Selectors / Enable (active high or active low)
Enable inputs must be on for the decoder to function, otherwise its outputs
assume a single "disabled" output code word.
Decoders are sometimes called minterm generators.
For each of the input combinations, exactly one output is true.
Each output equation contains all of the input variables.

3-to-8 Decoder with Enable

A variation of the standard


decoder
The decoders weve seen so far are active-high
decoders.
An active-low decoder is the same thing, but with
an inverted EN input and inverted outputs.

Decoder(Contd.)
Active-high decoders generate minterms.
Active-low decoders generate maxterms.

Q3
Q2
Q1
Q0

=
=
=
=

Q3
Q2
Q1
Q0

S1 S0
S1 S0
S1 S0
S1 S0
=
=
=
=

(S1 S0) = S1 + S0
(S1 S0) = S1 + S0
(S1 S0) = S1 + S0
(S1 S0) = S1 + S0

Encoders

Priority Encoder

ERROR DETECTING CODES


Parity System
- Simplest method for error detection
Binary data are typically transmitted between computers
Because of noise, a corrupted bit will change value
To detect errors, extra bits are added to each data value, called parity
bits
Parity bit: is used to make the number of 1s odd or even
Two types :
Even Parity - One bit is attached to the information so that
the total number of 1 bits is an even number

Odd Parity - One bit is attached to the information so that


the total number of 1 bits is an odd number

Parity System(Contd.)
Parity can detect all single-bit errors
If even parity is used and a single bit changes, it will change the
parity to odd, which will be detected at the receiver end
The receiver end can detect the error, but cannot correct it
because it does not know which bit is erroneous
Can also detect some multiple-bit errors
Error in an odd number of bits

PARITY BIT GENERATION


Parity Bit Generation
For b6b5... b0(7-bit information); even parity bit beven
beven = b6 b5 ... b0
For odd parity bit
bodd = beven 1 = beven

Parity Generator Circuit(even parity)


b6
b5
b4
b3
b2
b1

Parity Checker

beven

b0

beven
b6
b5
b4
b3
b2
b1
b0

Even Parity
error indicator

Hamming Code
Error Correcting code
Can detect and correct only single error

Hamming Code: Example

Hamming Code (Contd.)


Position 1: check 1 bit, skip 1 bit, check 1 bit, skip 1 bit,
etc. (1,3,5,7,9,11,13,15,...)
Position 2: check 2 bits, skip 2 bits, check 2 bits, skip 2 bits,
etc. (2,3,6,7,10,11,14,15,...)
Position 4: check 4 bits, skip 4 bits, check 4 bits, skip 4 bits,
etc. (4,5,6,7,12,13,14,15,20,21,22,23,...)
Position 8: check 8 bits, skip 8 bits, check 8 bits, skip 8 bits,
etc. (8-15,24-31,40-47,...)
Position 16: check 16 bits, skip 16 bits, check 16 bits, skip
16 bits, etc. (16-31,48-63,80-95,...)

Hamming Code(Contd.)
By including extra parity bit, hamming code can be used
to detect double errors and correct single error

Das könnte Ihnen auch gefallen