Vous êtes sur la page 1sur 15

DIGITAL BASICS

Introduction

Digital techniques are now well established in the world of broadcasting. This is due to the fact that though the digital system seems more complex, however, it has many advantages, such as higher accuracy, stability, flexibility etc. Therefore, in spite of their complexity and higher costs, digital circuits are being used for great variety of operations. Secondly with the easy availability of digital circuits in I.C. forms, extreme large digital circuits can be reliably built in small volumes at relatively low cost. In broadcasting, digital techniques are being used in tape recorders, mixers, switchers, signal processors, level control, reverberation generators, remote control of airconditioning plants, automation in recording, studio-transmitter links, control and tuning of transmitter etc.

Analog and Digital Signals


A continuous signal is known as analog signal. It has many continuous values. On the other hand, a digital signal has discrete values either it is available or not available. The input to and output from a microphone, the output of a loudspeaker, a singer singing a song etc. are examples of continuous signals. A switch is being switched ON and OFF, the output available is a digital signal. This has been shown in fig. 1

Fig. 1 Analog and Digital Signals So what do we find in the above figure ? The digital signal has got only two states High and Low or ON and OFF or 1 and 0. 1 may be 5V, 10V or 12V etc. In the same

Basic Course way 0 may be 0V, 0.2V or 0.5V etc. The states of digital signal give an idea of a new number system, which is known as Binary Number System.

Binary Number System


We all are aware of decimal number system where basic digits are from 09 (total ten digits and hence the name). All the numbers have been written with the help of these ten digits. In the binary system we have only two basic digits i.e. 0 and 1. All the numbers of binary system are written with the help of these two digits as given below : Decimal Number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Binary Number 0 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111 10000 10001 10010 10011 10100

It is interesting to note that all the binary numbers are inside the decimal numbers. Take out those decimal numbers which contains digits 0 and 1 only. This will result in binary number e.g. 0, 1, 10, 11, 100, 101, 110, 111.

Base
The number of digits or basic symbols in a number system is known as its base. The decimal system has a base of 10 because it uses 10 digits. Binary has a base of 2, octal has a base of 8 and hexadecimal a base of 16.

Bit
Bit is an abbreviated form of binary digit. Instead of saying that 10110 has five binary digits, we can say that it has 5 bits.

Hexadecimal Number System

STI(T) Publication

001/BC/2001

Digital Basics

It is a number system with a base of 16. This system has 16 digits as follow 0, 1, 2, 3, 4, 5, 6, 7, 8, A, B, C, D, E, F

Octal Number System


It is a number system with a base of 8. It has the following 8 digits. 0, 1, 2, 3, 4, 5, 6, 7

Binary to Decimal Conversion


We can express any decimal integer (a whole number) in units, tens, hundreds, thousands and so on. For instance decimal number 3056 may be written as 3856 = 3000 + 800 + 50 + 6

In power of 10, this becomes 3856 = 3(10)3 + 8(10) 2 + 5(10) 1 + 6(10) o

Here each digit position has a weight or value. The sum of all the digits multiplied by their weights gives the total amount being represented.

Binary Weight
In a similar way we can rewrite any binary number in terms of weights. For example binary number 111 becomes In decimal it is 111 7 7 = = = = 100 + 10 + 1 4+2+1 1(2)2 + 1(2)1 + 1(2)o 1(4) + 1(2) +1

Procedure for Binary to decimal conversion i) ii) iii) iv) Example 1. Convert binary number 101 into equivalent decimal number Step I) Step ii) Step iii) Step iv) : : : : 101 421 401 4+1=5 Write the binary number Directly under the binary number write 1, 2, 4, 6, 8, 16 working from right to left. If a zero appears in a digit position, delete/cross out weight for that position. Add the remaining weights to obtain the decimal equivalent.

STI(T) Publication

001/BC/2001

Basic Course

2.

Convert binary number 10101 into equivalent decimal number Step I) Step ii) Step iii) Step iv) : : : : 1 16 16 16 + 0 8 0 0 + 1 4 4 4 + 0 2 0 0 + 1 1 1 1

21

Conversion of binary fractions What is the decimal equivalent of 0.101. In this case, the weight of digit positions to the right of the binary point are given by , , 1/8, 1/16, 1/32, .. In power of 2, the weight are 2-1, 2-2, 2-3, 2-4, or in decimal form 0.5, 0.25, 0.125, 0.0625 Hence the decimal equivalent for the binary fraction 0.101 can be calculated as follow 0.1 0 1 0.5 + 0 + 0.125 3. = 0.625

What is the decimal equivalent of binary fraction 0.1101 ? 0.1 0.5 + 1 0.25 + 0 0.125 + 1 0.0625 = 0.8125

Hence for conversion of binary number into decimal number you should remember the following : 23 22 21 20 o 2-1 2-2 2-3 Binary point

Decimal to Binary Conversion


Double Dabble This is a very popular way to convert decimal numbers to binary numbers. In this method you progressively divide the decimal number by 2, writing down the remainder after each division. The remainders, taken in reverse order is the required binary number. Let us convert decimal number 13 into equivalent binary number Step 1 Divide 13 by 2, 2) 13 ( 6 ------ Quotient is 6 12 1 ---------- remainder = 1 STI(T) Publication 4 001/BC/2001

Digital Basics

Step 2 2) 6 ( 3 ------ Quotient is 3 6 0 ---------- remainder = 0 Step 3 2) 3 ( 1 ------ Quotient is 1 2 1 ---------- remainder = 1 Step 4 2) 1 ( 0 ------ Quotient is 0 0 1 ---------- remainder = 1 In final division, 2 does not divide into 1, therefore, the quotient is 0 with a remainder of 1. Hence binary equivalent of 13 = 1101. Binary Addition 0+0 0+1 1+0 1+1 Example Add binary number 1 0 1 0 to Binary 1010 + 1011 10101 Binary multiplication 0 x0 0x1 1x0 1x1 Example Multiply 1 0 1 by 1 1 0 Binary Decimal 101 5 110 x 6 000 30 101x = = = = 0 0 0 1 1011 Decimal 10 + 11 21 = = = = 0 1 1 10 0 plus 0 equals 0 0 plus 1 equals 1 1 plus 0 equals 1 1 plus 1 equals 0 with a carry of 1

STI(T) Publication

001/BC/2001

Basic Course 101xx 11110

Logic Gates
Logic gate is somewhat similar to normal gate. When a gate is opened something is allowed to pass and when it is closed nothing is allowed to pass through. But logical gate things logically and then acts. It works with certain conditions. When all the conditions are fulfilled input is allowed to pass as output. A logic gate is a digital circuit with one or more inputs, but only one output. The output is high only for certain combinations of the input signals. We have different types of gates such as AND gate, OR gate, NOT gate etc. These can be designed with the help of switches, diodes, transistors and ICs. Let us discuss these gates one by one.

AND Gate
The AND Gate has two or more inputs but only one output. When all the inputs are high (1), the output is high (1) otherwise it is low (0). This gate can be implemented with simple switches as shown in Fig. 2.

Fig. 2 AND gate drawn with simple switches A and B In the above figure switches A and B are connected in series with the supply. When both the switches are ON (i.e. 1 or High), the bulb is ON (1 or High). If any of the switches is OFF (0 or Low), the bulb is OFF (0 or Low). Hence the combination of switches A and B is known as AND gate. The symbol of AND gate is shown in fig. 3.

Fig. 3 Symbol of AND gate

Truth Table

STI(T) Publication

001/BC/2001

Digital Basics A truth table gives details of various combinations of inputs and corresponding outputs. The truth table of AND gate is given below : Truth Table of AND Gate I/P B 0 1 0 1 0 1 = LOW/OFF = HIGH/ON O/P Y 0 0 0 1

A 0 0 1 1

AND Gate can also be implemented with diodes as shown in Fig. 4.

Fig. 4 And gate drawn with diodes When either A or B input is low (0), D1 or D2 is forward biased and output Y is low(0). When both inputs A and B are high (1) together, the output Y is High (1). In the same way AND Gate can also be designed with the combinations of Diodes and transistors or only transistors. The AND gate designed in IC form is shown in Fig. 5.

STI(T) Publication

001/BC/2001

Basic Course

Fig. 5 Quad 2-input TTL AND gates This gate works on the logic of 'this and that' hence the name is AND gate.

OR Gate
This gate has two or more inputs and one output. When any or all the inputs are high (1) the output is high (1). Fig. 6 and 7 show the OR gate designed with the help of switches and diodes respectively.

Fig. 6 OR gates drawn with switches

Fig. 7 OR gate drawn with diodes

In figure 6 bulb starts glowing when switch A or B is ON (1 or High). In fig. 7 output Y is High (1) when either input A or B is high (1) making D1 or D2 to conduct. Symbol of OR Gate is shown in fig. 8. Fig. 9 shows OR gates in IC form.

Fig. 8 Symbol of OR gate Truth Table I/P A 0 0 1 1 B 0 1 0 1 O/P C 0 1 1 1

STI(T) Publication

001/BC/2001

Digital Basics Fig. 9 Quad 2-input TTL OR gates This gate works on the logic of 'This or that', hence the name is OR gate

NOT Gate
The NOT gate has one input and one output. When the input is High (1), the out is low (O) and vice versa. Fig. 10 shows this gate designed with a switch.

Fig. 10 NOT gate drawn with a switch

Fig. 11 NOT gate drawn with a transister

When the switch is ON (1 or High) the bulb is shorted and hence it does not glow (OFF or 0 or LOW). When switch is OFF (open or 0) the bulb is ON (1 or High). In Fig. (11) the NOT gate has been drawn with a transistor. When the input A is high (1) the transistor is forward biased and so it conducts making Y low (0). When the input A is low (0), the transistor is cut off and hence the output Y is high (1). Since the NOT gate inverts the sense of the output with respect to input, it is also called as an inverter. Fig. 13 shows NOT gates in IC form. Symbol of NOT gate

Fig. 12 Symbol of NOT gate Truth Table A 0 1 T 1 0

STI(T) Publication

001/BC/2001

Basic Course

Fig. 13 TTL NOT gates (Hex inverters) This gate works on the logic of 'negative', hence the name is NOT gate.

NAND Gate
A NAND gate has two or more inputs and a single output. It is a combination of an AND gate and a NOT gate. The output of a NAND gate assumes the 0 state if and only if all the inputs assume the 1 state. Fig. 14 shows the NAND gate designed with the help of switches. Symbol of NAND gate is given in fig.15. Fig. 16 shows NAND gates in IC form.

Fig. 14 NAND gate drawn with switches

Fig. 15 Symbol of NAND gate Truth Table I/P A 0 0 1 1 B 0 1 0 1 O/P Y 1 1 1 0

STI(T) Publication

10

001/BC/2001

Digital Basics Fig. 16 Quad 2-input NAND gates

NOR Gate
A NOR gate has two or more inputs and a single output. It is a combination of an OR gate followed by a NOT gate. The output of a NOR gate assumes the 1 state if and only if all the inputs assume the 0 state. Fig. 17 shows the NOR gate designed with the help of switches. Symbol of NOR gate is given in fig. 18. Fig. 19 shows NOR gates in IC form.

Fig. 17 NOR gate drawn with switches

Fig. 18 Symbol of NOR gate Truth Table I/P A 0 0 1 1 B 0 1 0 1 O/P Y 1 0 0 0

Fig. 19 Quad 2-input NOR gates

STI(T) Publication

11

001/BC/2001

Basic Course

NAND and NOR gates are known as 'Universal Gates' as any gate or logical circuit can be implemented with them. Exclusive OR Gate EX-OR gate has two or more inputs and one output. It has high output only when odd number of inputs are high. Symbols of Ex-OR gate

Fig. 20 Symbol of EX-OR gate Truth Table I/P A 0 0 1 1 B 0 1 0 1 O/P Y 0 1 1 0

Figure 21 shows how to build an EX-OR Gate with the help of AND, OR and NOT Gates.

Fig. 21 Imlimentation of EX-OR gate with AND, OR and NOT gates The opposite of Ex-OR gate is Ex-NOR gate.

Flip-Flops
A flip-flop(FF) is a bistable electric circuit that has two stable states. The flip-flop also has memory unlike gates described in previous paragraphs, since its output will remain

STI(T) Publication

12

001/BC/2001

Digital Basics as set until something is done to change it. FF has two outputs, defined as Q and Q.Q and Q are complementary.

i)

R.S. Flip-flop : The basic R-S flip-flop with NOR gates is shown below along with truth table. Truth Table (with NOR gates) R 0 0 1 1 S 0 1 0 1 Qn Qn-1 1 (Set) 0 (Reset) * Qn Qn-1 0 1 *

Truth Table (with NAND gates) R 1 0 1 0 S 1 1 0 0 *Forbidden Qn Qn-1 1 (Set) 0 (Reset) * Qn Qn-1 0 1 *

Fig. 22 RS flip-flop drawn with NOR and NAND gates and its symbol

ii)

Clocked RS Flip-Flop : In the RS FF any change in input information at R and S is transmitted immediately to the output at Q and Q according to the truth table. Addition of two AND gates at the R and S inputs results in enabling/disabling the FF. This flip-flop is called a clocked RS flip-flop. The R and S inputs are transmitted to the output only when clock pulse is present.

STI(T) Publication

13

001/BC/2001

Basic Course

Logic diagram and truth table are given below :CLK 0 0 0 0 1 1 1 1 Truth Table R 0 0 1 1 0 0 1 1 S 0 1 0 1 0 1 0 1 Qn Qn-1 Qn-1 Qn-1 Qn-1 Qn-1 1 0 *

Fig. 23 Logic diagram

iii)

D Flip-Flop : The RS flip-flop has two data inputs R and S. To store a high bit, we need a high S; to store a low bit, we need a high R. Generation of two signals to drive has disadvantages in many applications. Furthermore, something forbidden condition of both R and S high may occur in advertently. These problems are avoided in D flip-flop, which needs only a single data input.

Logic diagram, symbol and truth table of D-FF are shown below :-

Fig. 24 Logic diagram, symbol and truth table of D Flip-Flop

STI(T) Publication

14

001/BC/2001

Digital Basics

iv)

Edge Triggered D Flip-Flop In edge-triggered D FF, an RC circuit, having much smaller time constant than the clock pulse width, is introduced at the clock input. This produces narrow positive and negative spikes at the leading and trailing edges of clock pulse. The FF can be triggered at the positive or negative edge of the pulse. PRESET and CLEAR inputs can also be provided in the flip-flop. PRESET forces Q to 1; a high CLEAR resets Q to 0. A high

Logic diagram and symbols of these FFs are given below :

Fig. 25 Logic diagram and symbols of edge triggered D Flip-Flop

STI(T) Publication

15

001/BC/2001

Vous aimerez peut-être aussi