Search This Blog

Wednesday, 14 May 2014

Shift Operators in VHDL


Shift operators are playing very important role in VHDL language. It is very usefull to shift or rotate digits of binary numbers.

There are total six shifting operators in VHDL language.
  •  sll
    • It means Logical Shift Left.
    • It shifts the elements in the array by n places to left and fill vacanted positions with "0".
    • Ex
      • "1000_1010" sll 3 will give "0101_0000".
      • "1000_1010" sll -2 will give "0010_0010".

Wednesday, 11 December 2013

Implement XOR Gate using 2x1 Multiplexer

We have two inputs A, B. Connect one of Multiplexer's input to input 'B'. Connect input 'B' to input of NOT gate and output of this NOT gate connect to second input of Multiplexer. Then connect input 'A' to selection line of Multiplexer. So, this Multiplexer will XORing operation of input A, B.

Monday, 9 December 2013

Implement OR Gate using 2x1 Multiplexer

We have two inputs A, B. Connect one of Mux's input to logic '1' and second to input 'B'. Connect input 'A' to selection line of Mux. So, output will give ORing operation of two inputs A, B.


Implement AND Gate using 2x1 Multiplexer

We have two inputs A, B. Connect one of Mux's input to logic '0' and second to input 'B'. Connect input A to selection line of Mux. So, output of Mux will give anding operation of two inputs A and B.


Implement BUFFER Gate using XOR Gate

Connect one of XOR gate's input to logic '0' and connect second to input 'a'. So XOR gate will give output as input.