+ All Categories
Home > Documents > 01 Digital Basics

01 Digital Basics

Date post: 05-Apr-2018
Category:
Upload: sonusaurabhsingh
View: 221 times
Download: 0 times
Share this document with a friend

of 14

Transcript
  • 7/31/2019 01 Digital Basics

    1/14

    1DIGITAL BASICSIntroduction

    Digital techniques are now well established in the world of broadcasting. This is due tothe fact that though the digital system seems more complex, however, it has manyadvantages, such as higher accuracy, stability, flexibility etc. Therefore, in spite of their

    complexity and higher costs, digital circuits are being used for great variety ofoperations. Secondly with the easy availability of digital circuits in I.C. forms, extremelarge 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 air-conditioning plants, automation in recording, studio-transmitter links, control and tuningof 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 singinga song etc. are examples of continuous signals. A switch is being switched ON andOFF, 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

  • 7/31/2019 01 Digital Basics

    2/14

    Basic Course

    way 0 may be 0V, 0.2V or 0.5V etc. The states of digital signal give an idea of a newnumber 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 theseten digits. In the binary system we have only two basic digits i.e. 0 and 1. All thenumbers of binary system are written with the help of these two digits as given below :

    Decimal Number Binary Number

    0 01 12 103 114 1005 101

    6 1107 1118 10009 100110 101011 101112 110013 110114 111015 111116 1000017 10001

    18 1001019 1001120 10100

    It is interesting to note that all the binary numbers are sequencely inside the decimalnumbers. Take out those decimal numbers which contains digits 0 and 1 only. This willresult 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. Thedecimal 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 binarydigits, we can say that it has 5 bits.

    Octal Number System

    STI(T) Publication 2 001/BC/2005

  • 7/31/2019 01 Digital Basics

    3/14

    Digital Basics

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

    Hexadecimal Number System

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

    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 bytheir weights gives the total amount being represented.

    In a similar way we can rewrite any binary number in terms of weights. For examplebinary number 111 becomes

    111 = 100 + 10 + 1In decimal it is 7 = 4 + 2 + 1

    7 = 1(2)2 + 1(2)1 + 1(2)o

    = 1(4) + 1(2) +1

    Procedure for Binary to decimal conversion

    i) Write the binary number ii) Directly under the binary number write 1, 2, 4, 6, 8, 16 working from right to

    left.iii) If a zero appears in a digit position, delete/cross out weight for that position.iv) Add the remaining weights to obtain the decimal equivalent.

    Example

    . Convert binary number 101 into equivalent decimal number

    Step i) : 1 0 1Step ii) : 4 2 1Step iii) : 4 0 1Step iv) : 4 + 0 + 1 = 5

    2. Convert binary number 10101 into equivalent decimal number

    Step i) : 1 0 1 0 1

    STI(T) Publication 3 001/BC/2005

  • 7/31/2019 01 Digital Basics

    4/14

    Basic Course

    Step ii) : 16 8 4 2 1Step iii) : 16 0 4 0 1Step iv) : 16 + 0 + 4 + 0 + 1 = 21

    Conversion of binary fractions

    What is the decimal equivalent of 0.101. In this case, the weight of digit positions to theright of the binary point are given by , , 1/8, 1/16, 1/32, ..

    In power of 2, the weights 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 = 0.625

    3. What is the decimal equivalent of binary fraction 0.1101 ?

    0.1 1 0 10.5 + 0.25 + 0.125 + 0.0625 = 0.8125

    Hence for conversion of binary number into decimal number you should remember thefollowing :

    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 thismethod you progressively divide the decimal number by 2, writing down the remainderafter each division. The remainders, taken in reverse order is the required binarynumber. Let us convert decimal number 13 into equivalent binary number

    Step 1 Divide 13 by 2,

    2) 13 ( 6 ------ Quotient is 6121 ---------- remainder = 1

    Step 22) 6 ( 3 ------ Quotient is 3

    60 ---------- remainder = 0

    Step 3

    STI(T) Publication 4 001/BC/2005

  • 7/31/2019 01 Digital Basics

    5/14

    Digital Basics

    2) 3 ( 1 ------ Quotient is 121 ---------- remainder = 1

    Step 42) 1 ( 0 ------ Quotient is 0

    0

    1 ---------- remainder = 1

    In final division, 2 does not divide into 1, therefore, the quotient is 0 with aremainder of 1. Hence binary equivalent of 13 = 1101.

    Binary Addition

    0 + 0 = 0 0 plus 0 equals 00 + 1 = 1 0 plus 1 equals 11 + 0 = 1 1 plus 0 equals 11 + 1 = 1 0 1 plus 1 equals 0 with a carry of 1

    Example

    Add binary numbers 1010 to 1011

    Binary Decimal1 0 1 0 1 0

    + 1 0 1 1 + 1 11 0 1 0 1 2 1

    Binary multiplication

    0 x 0 = 00 x 1 = 01 x 0 = 01 x 1 = 1

    Example

    Multiply 101 by 110

    Binary Decimal1 0 1 - 5

    x 1 1 0 - x 60 0 0 3 0

    1 0 1 x1 0 1 x x1 1 1 1 0

    Logic Gates

    Logic gate is somewhat similar to normal gate. When a gate is opened something isallowed to pass and when it is closed nothing is allowed to pass through. But logicalgate things logically and then acts. It works with certain conditions. When all theconditions are fulfilled, input is allowed to pass as output.

    STI(T) Publication 5 001/BC/2005

  • 7/31/2019 01 Digital Basics

    6/14

    Basic Course

    A logic gate is a digital circuit with one or more inputs, but only one output. The outputis 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 canbe designed with the help of switches, diodes, transistors and ICs. Let us discuss thesegates 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 withsimple switches as shown in Fig. 2.

    Fig. 2 AND gate realised with simple switches A and B

    In the above figure, switches A and B are connected in series with the supply. Whenboth the switches are ON (i.e. 1 or High), the bulb is ON (1 or High). If any of theswitches is OFF (0 or Low), the bulb is OFF (0 or Low). Hence the combination ofswitches 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

    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

    0 = LOW/OFF

    STI(T) Publication 6 001/BC/2005

    I/P O/P

    A B Y0011

    0101

    0001

  • 7/31/2019 01 Digital Basics

    7/14

    Digital Basics

    1 = HIGH/ON

    AND Gate can also be implemented with the help of 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 andtransistors or only transistors. The AND gate designed in IC form is shown in Fig. 5.

    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 switchesand diodes respectively.

    STI(T) Publication 7 001/BC/2005

  • 7/31/2019 01 Digital Basics

    8/14

    Basic Course

    Fig. 6 OR gates realised with switches Fig. 7 OR gate realised with diodes

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

    Fig. 8 Symbol of OR gate

    Truth TableI/P O/P

    A B C0 0 0

    0 1 1

    1 0 11 1 1

    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 realised with a switch Fig. 11 NOT gate realised with a transister

    STI(T) Publication 8 001/BC/2005

  • 7/31/2019 01 Digital Basics

    9/14

    Digital Basics

    When the switch is ON (1 or High) the bulb is shorted and hence it does not glow (OFFor 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 gateinverts 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 T0 1

    1 0

    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 ANDgate and a NOT gate. The output of a NAND gate assumes the 0 state if and only if allthe 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.

    STI(T) Publication 9 001/BC/2005

  • 7/31/2019 01 Digital Basics

    10/14

    Basic Course

    Fig. 14 NAND gate realisedwith switches

    Fig. 15 Symbol of NAND gate

    Truth Table

    I/P O/PA B Y

    0 0 10 1 1

    1 0 11 1 0

    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 ORgate followed by a NOT gate. The output of a NOR gate assumes the 1 state if andonly if all the inputs assume the 0 state. Fig. 17 shows the NOR gate designed with thehelp of switches. Symbol of NOR gate is given in fig. 18. Fig. 19 shows NOR gates in ICform.

    Fig. 17 NOR gate realisedwith switches

    STI(T) Publication 10 001/BC/2005

  • 7/31/2019 01 Digital Basics

    11/14

    Digital Basics

    Fig. 18 Symbol of NOR gate

    Truth Table

    I/P O/PA B Y

    0 0 10 1 0

    1 0 01 1 0

    Fig. 19 Quad 2-input NOR gates

    NAND and NOR gates are known as 'Universal Gates' as any gate or logical circuit canbe implemented with them.

    Exclusive OR Gate

    EX-OR gate has two or more inputs and one output. It has high output only when oddnumber of inputs are high.

    Symbols of Ex-OR gate

    Fig. 20 Symbol of EX-OR gate

    Truth Table

    I/P O/PA B Y

    0 0 0

    0 1 1

    1 0 1

    1 1 0

    STI(T) Publication 11 001/BC/2005

  • 7/31/2019 01 Digital Basics

    12/14

    Basic Course

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

    Fig. 21: Implementation 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 electronic circuit that has two stable states. Unlike gates, theflip-flop has memory since its output will remain 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 withtruth table.

    Truth Table (with NOR gates)

    R S Qn Qn

    0 0 Qn-1 Qn-10 1 1 (Set) 0

    1 0 0 (Reset) 1

    1 1 * *

    Truth Table (with NAND gates)R S Qn Qn

    1 1 Qn-1 Qn-10 1 1 (Set) 0

    1 0 0 (Reset) 1

    0 0 * *

    *Forbidden

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

    STI(T) Publication 12 001/BC/2005

  • 7/31/2019 01 Digital Basics

    13/14

    Digital Basics

    ii) Clocked RS Flip-Flop : In the RS FF any change in input information at R andS 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 theFF. 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.

    Logic diagram and truth table are given below :-

    Truth Table

    CLK R S Qn0 0 0 Qn-10 0 1 Qn-10 1 0 Qn-10 1 1 Qn-11 0 0 Qn-11 0 1 11 1 0 0

    1 1 1 *

    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 twosignals to drive has disadvantages in many applications. Furthermore,something forbidden condition of both R and S high may occur inadvertently.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 of D Flip-Flop

    STI(T) Publication 13 001/BC/2005

  • 7/31/2019 01 Digital Basics

    14/14

    Basic Course

    iv) Edge Triggered D Flip-Flop

    In edge-triggered D FF, an RC circuit, having much smaller time constant thanthe clock pulse width, is introduced at the clock input. This produces narrowpositive 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. A highPRESET forces Q to 1; a high CLEAR resets Q to 0.

    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 14 001/BC/2005


Recommended