Nityanand's Weblog

  • view my stats

    free page hit counter
  • Earn Money by viewing ads

  • Useful Links

Archive for the ‘Digital Design’ Category

Universal Logic : Mux to Logic gates conversion

Posted by Nityanand Dubey on January 7, 2010


We have seen the universal gates in out previous posts. The NAND and NOR are called the universal gates because they can create any of the logic gates.

There is an another concept called “Universal Logic”, Universal logic can also be used to create any of the logic gates.

MUX and Decoders are called “Universal Logic”

In this post, we will see haw a 2:1 MUX can be used to create different logic gates.

1. Designing an Inverter using 2:1 MUX.

To design an inverter using 2:1 mux, we have to use the input as the select line of the MUX and the “zeroth” select line would be tied with “Logic 1 ” and “First” select line would be tired with “Logic 0”, Now when the select line (Input) goes to “1” the out put will be “0” ( inverted).

Image : MUX to inverter –

2:1 mux as an inverter

2. Designing an AND Gate using 2:1 MUX.

To design an AND using 2:1 mux, we need to tie the “zeroth” input to “Logic 0” and the “First” input to the one of the input of the AND Gate. The other input of AND gate would be connected with the select line of the MUX.

Now, the out put of the MUX would be “1” only if the both of the inputs are “1” otherwise it would be “0” for all conditions.

Image : MUX to AND Gate –

2:1 MUX as an AND gate

3. Designing an OR Gate using 2:1 MUX.

To design an OR using 2:1 mux, we need to tie the “First” input to “Logic 1” and the “Zeroth” input to the one of the input of the OR Gate. The other input of OR gate would be connected with the select line of the MUX.

Now, the output of the MUX would be “1” when any oth the two inputs would be “1” otherwise it would be “0” for all conditions.

Image : MUX to OR Gate –

2:1 MUX as an OR Gate

4. Designing an NOR Gate using 2:1 MUX.

To design the NOR using 2:1 mux, we need to tie the “Zeroth” input of mux to one of the input of NOR and another input of MUX is tied to “0” . The another input of NOR gate would be applied to the select line of the MUX.

Now, the output of the MUX would be A’B’ = (A+B)’. which is as same as the output of NOR Gate.

Image : MUX to NOR Gate –

2:1 mux as a NOR Gate

5. Designing an NAND Gate using 2:1 MUX.

To design the NAND using 2:1 mux, we need to combine the AND Gate and inverter implementation

6. Designing an XOR Gate using 2:1 MUX.

To design the XOR using 2:1 mux, we need to tie the “Zeroth” input of mux to one of the input of XOR and another input of MUX to the inverted of first input. The another input of XOR gate would be applied to the select line of the MUX.

Now, the output of the MUX would be AB’ + A’B which is as same as the output of XOR Gate.

Image : MUX to XOR Gate –

2:1 Mux as a XOR gate

7. Designing an XNOR Gate using 2:1 MUX.

To design the XNOR using 2:1 mux, we need to tie the “First” input of mux to one of the input of XOR and another input of MUX to the inverted of first input. The another input of XOR gate would be applied to the select line of the MUX.

Now, the output of the MUX would be A’B’ + AB which is as same as the output of XNOR Gate.

Image : MUX to XNOR Gate –

2:1 mux as a XNOR Gate

Advertisements

Posted in Digital Design | Tagged: , , , , , , , , , | 29 Comments »

What is a Universal Gate and Why NOR is called a Universal gate?

Posted by Nityanand Dubey on December 4, 2009

This is a continuation of previous post, in this post, we will see the NOR gate as a univarsal gate and create different gates using NOR gate.

As we know that NAND and NOR Gates are called Universal Gates since they can cerate any of the Logic Gate

Lets see to how to make all other logic gates by using the NOR Gate

1. NOR gate to NOT Gate conversion

Refer the following diagram –

Digital : Image – NOR to NOT

NOR to NOT Conversion

NOR to NOT Conversion

Here the same input is applied to the both inputs of a NOR Gate

According to NOR Gate – If A and B are two inputs than output equation will be (A+B)’

For this case :

= (X+X)’
= X’
= Inverted Input

2. NOR Gate to AND Gate Convertion

Refer following diagram for NOR to AND Gate conversion –

Digital : Image – NOR to AND Conversion

NOR to AND Conversion

NOR to AND Conversion

According to diagram –

s1 = (X+X)’ = X’
s2 = (Y+Y)’ = Y’
s3= (s1+s2)’ = (X’+Y’)’
=> (X’)’ .(Y’)’
=> X.Y
=> AND Gate

3. NOR Gate to OR Gate Convertion

Refer the following Diagram

Digital : Image – NOR to OR Convertion

NOR to OR

NOR to OR


For this case – X and Y are the two inputs to a NOR gate and the output of the First NOR gate goes again to an another NOR gate’s inputs.

=> s1 = (X+Y)’
=> s2 = (s1+s1)’ = s1’
=> s2 = ((X+Y)’)’
=> X+Y

=> OR Gate

4. NOR Gate to NAND Gate Convertion

Refer the following Diagram

Digital : Image – NOR to NAND

NOR to NAND Conversion

NOR to NAND Conversion


According to diagram –

s1 = (X+X)’ = X’
s2 = (Y+Y)’ = Y’
s3 = (s1+s2)’ = (X’+Y’)’
=> (X’)’ .(Y’)’
=> X.Y
s4 = (s3 + s3)’
=> s3′
=> (X.Y)’
=> NAND Gate

5. NOR to XOR Gate

Digital : Image – NOR to XOR Gate Convertion

6. NOR to XNOR Gate

Digital : Image – NOR to XNOR Gate Convertion

Posted in Digital Design | Tagged: , , , , , , | 2 Comments »

What is a Universal Gate and Why NAND is called a Universal gate?

Posted by Nityanand Dubey on March 6, 2009

A Logic Gate which can infer any of the gate among Logic Gates. OR a gate which can be use to create any Logic gate is called Universal Gate

We have following Logic Gates

NOT
AND
OR
NAND
NOR
XOR
XNOR

NAND and NOR Gates are called Universal Gates because all the other gates can be created by using these gates

In this post, we will see to how to make all other logic gates by using the NAND Gate

1. NAND gate to NOT Gate conversion

Refer the following diagram –

Digital : Image – NAND to NOT

Nand to Not conversion

Nand to Not conversion

Here the same input is applied to the both inputs of a NAND Gate

According to NAND Gate – If A and B are two inputs than output equation will be (A.B)’

For this case :

= (X.X)’
= X’

2. NAND Gate to AND Gate Convertion

Refer following diagram for NAND to and Gate conversion –

Digital : Image – NAND to AND

NAND to AND conversion

NAND to AND conversion

For this case – x and y are the two inputs to a NAND gate and the output of the First NAND gate goes again to an another NAND gate’s inputs.

=> s1 = (X.Y)’
=> s2 = (s1.s1)’ = s1’
=> s2 = ((X.Y)’)’
=> X.Y

3. NAND Gate to OR Gate Conversion

Refer the following Diagram

Digital : Image – NAND to OR

NAND to OR Conversion

NAND to OR Conversion

According to diagram –

s1 = (X.X)’ = X’
s2 = (Y.Y)’ = Y’
s3= (s1.s2)’ = (X’.Y’)’
=> (X’)’ + (Y’)’
=> X+Y

4. NAND Gate to NOR Gate Convertion

Refer the following Diagram

Digital : Image – NAND to NOR

NAND to NOR conversion

NAND to NOR conversion

According to diagram –

s1 = (X.X)’ = X’
s2 = (Y.Y)’ = Y’
s3= (s1.s2)’ = (X’.Y’)’
=> (X’)’ + (Y’)’
=> X+Y
s4 = (s3.s3)’ = s3’
=> (X + Y)’

5. NAND to XOR Gate

Digital : Image – 5

6. NAND to XNOR Gate

Digital : Image – 6



Posted in Digital Design | Tagged: , , , , , , , , , , , | 8 Comments »

What is the difference between a Latch and a Flip-Flop

Posted by Nityanand Dubey on August 21, 2008

 

The Latches and Flop-flop, both are considered as a sequential element of Digital Design. It means the output of both blocks; depend on the input as well as the previous output.

Here are some difference between the latches and Flip-flops(FF)

1. Functionality : The Latches are level sensitive blocks, it means the output may change any time during the active phase of clock ( As input changes) In other hand the Flip-flops as edge sensitive and output changes only with the clock edge. In between it does not changes (even though input toggles)

2.  Area : The latches take less area than Flip-flops, Since the Flip-flops made of latches. The D Flip flop made of two latches in master-slave configuration.

3.  Speed: The latches are more faster than then the Flop flops, Since less number of gates used in the latches,

4. . Clock : Latches may of may not have clocks. But A Flip-flop must be having a clock.

Posted in Digital Design | Tagged: , , , , | 1 Comment »

Design an Inverter and a Pass Gate ( Buffer) using the XOR gate

Posted by Nityanand Dubey on July 27, 2008

The X-OR gate can be used as a Pass Gate and as an inverter. As per characteristic of an Inverter, the output should have opposite value of the input
Lets look into the given figure

Digital : Image – XOR as Inverter

 

From the given Image –

One of the inputs of XOR gate is tied with Logic Value 1. Lets see whether it would works as an Inverter or not

From the output equation of the XOR Gate –

 

Y = AB’ + A’B

Where
A and B are two Inputs to the XOR Gate and Y is the Output

According to the diagram, One input is tied with Logic ‘1’

=> Y = A.(1)’+ A’.1
=> Y = 0 + A’
=> Y = A’

Summary : If we tie one input of an XOR Gate with Logic value ‘1’ then XOR works as an Inverter

The X-OR gate can also be used as a pass Gate or a buffer that means it can be used to transmit the same input signal to the output.

Let look into the given figure

Digital : Image – XOR as Pass Gate

 

From the given Image –

One of the inputs of XOR gate is tied with Logic Value 0.
From the output equation of the XOR Gate –

Y = AB’ + A’B

Where
A and B are two Inputs to the XOR Gate and Y is the Output

According to the diagram, One input is tied with Logic ‘0’

=> Y = A.(0)’+ A’.0
=> Y = A + 0
=> Y = A

 

 

Summary : If we tie one input of an XOR Gate with Logic value ‘0’ then XOR works as a buffer that mean whatever we give at the input, same would appear at the output

 

Posted in Digital Design | Tagged: , , , , , | 1 Comment »