Skip to main content

Logic Gates & Flip Flops


Q.1. What are Logic Gates?

Ans.: A digital computer uses binary number system for its operation. In the binary system there are only 2 digits, 0 and 1. The manipulation of binary information is done by logic circuit known as logic gates. The important logical operations which are frequently performed in the design of a digital system are: (1) AND (2) OR (3) NOT (4) NAND (5) NOR and EXCLUSIVE OR.
An electronic circuit which performs a logical operation is called a logic gate.

Q.2. Explain design of digital multiplexer.

Ans.: A digital multiplexer has N inputs & only one output. By applying control signals any one input can be made, available at the output terminal. It‟s called data sector.


Q.3. What are Combinational & Sequential Circuits?

Ans.: There are two types of logic circuits, Combinational & Sequential. A combinational circuit is one in which the state of the O/P at any instant is entirely determined by the states of the I/P‟s at that time. Combinational circuits are those logic circuits whose operation can be completely described by a truth table.
A sequential circuit consists of a combinational logic & storage elements. The O/P of a sequential circuit is not only a function of the present I/P‟s but also of past I/P‟s. The state of the storage elements depends upon this preceding I/Ps and the preceding states of the elements.



Q.4. What are Flip Flops?

Ans.: A device is said to be bi-stable if it has 2 stable elements. A flip-flop is a bi-stable device. It has 2 stable stales. Its O/P remains either high or low. The high stable state is called SET. The other stable state is called RESET. It can store binary bit, rather 0 or 1. Thus, it has storing capability, i.e., memory.

Q.5. What are the different types of Flip-Flops?

Ans.: The following types of flip-flops are listed below :

(i) S-R Flip-Flop : A SR flip flop can be realized by connecting 2 NOR

(ii) J-K Flip-Flops : In an S-R flip flop, the state of the O/P is unpredictable when S-R =1. A J–K Flip flop allows inputs J=K = 1. In this situation, the state of the O/P is changed.

(iii) D-Flip Flops : An S-R flip flop has 2 inputs S& R. To store 1, a high S and low R an required. To store 0, a high R & low S are needed. Thus, 2 signals are to be generated to drive a S-R flip flop.

(iv) T-Flip Flop : A T-flip flop acts a toggle switch. Toggle means to switch over to the opposite state. It can be realized using a J-K flip flop by making T= J = K = 1


Q.6. What are Shift Registers?

Ans.: In a shift register, the flip-flops are connected in series. The O/P of each flip-flop is connected to the I/P of the adjacent flip flop. The contents of a shift register can be shifted within the registers without changing the order of the bits. Data are shifted one position left or right at a time when 1 clock pulse is applied. Shift register are used for the temporary storage of data. They are suited for processing serial data; converting serial data to parallel data & vice versa. 

Then are 4 types of shift registers.

(ii) Serial In - Serial Out

(iii) Serial In - Parallel Out

(iv) Parallel In - Serial Out

(v) Parallel In - Parallel Out

Q.7. What is a Counter? Explain.

Ans.: A Digital counter consists of a number of flip flops. Their function is to count electrical pulses. To count certain events, electrical pulses proportional to the event are produced for the counting purpose. Counters can also be used to count time interval or frequency. For such purposes, clock pulses are applied to the counter so the clock pulses occur at certain known intervals, the no. of pulses are proportional to time. Therefore, the time intervals can be easily measured. The frequency is inversely proportional to time. So, the frequency can also be measured. There are 2 types of counters, synchronous & asynchronous. In a synchronous counter, all flip-flops are clocked simultaneously. On the other hand, in asynchronous counter the flip flops are not clocked simultaneously. Each flip flop is triggered by the pervious flip flop.



Q.8. Explain about De-coders.

Ans.: A decoder is similar to demultiplexer without any data input. Most digital system require decoding of data. Decoding is necessary in applications such as data demultiplexing digital display, digital to analog converters etc. A decoder is a logic circuit that converts an n-bit binary input code (data) in 2^n O/P lines, such that each O/P lines will be activated for only one of the possible combinations of I/Ps.
In a decoder, the number of O/P is greater than the number of I/Ps.


Popular posts from this blog

C++ Program to find the sum, difference, product and quotient of two integers

#include <iostream.h> #include <conio.h> void main() {   clrscr();   int x = 10;   int y = 2;   int sum, difference, product, quotient;   sum = x + y;   difference = x - y;   product = x * y;   quotient = x / y;   cout << "The sum of " << x << " & " << y << " is " << sum << "." << endl;   cout << "The difference of " << x << " & " << "y <<  is " << difference << "." << endl;   cout << "The product of " << x << " & " << y << " is " << product << "." << endl;   cout << "The quotient of " << x << " & " << y << " is " << quotient << "." << endl;   getch(); }

Program of virtual piano

//////////////Tested And Created By C++/////////////////////////////// #include<stdio.h> #include<dos.h> #include<conio.h> #include<stdlib.h> #define SHOW 1 #define HIDE 2 union REGS input,output; class piano {  public:int BIGKEY,MIDKEY,back,border;     piano()//init constructor     {         BIGKEY=15;         MIDKEY=1;         back=7;         border=15;     } }color; void drawpiano(int x,int y); int check_xy(int x,int y); void BOX(int c,int r,int c1,int r1,int col); int initmouse(); void setupscreen(); void pointer(int on); void restrictmouse(int x1,int y1,int x2,int y2); void check_keys(int x,int y); void getmouse(int *button,int *x,int *y); float freq[7] = {130.81, 146.83, 164.81, 174.61,196, 220, 246.94 } ; int n=0,a=4,backcolor=2,exitcode=1; void showbar(int t) {  if(t>65) t=65;  if(t<1) t=1;  textcolor(15);  for(int q=0;q<=t;t++)  {     gotoxy(3+q,4);     cprintf("Û");  } } void main() {  int

Putimage function in c

putimage function outputs a bit image onto the screen. Declaration:- void putimage(int left, int top, void *ptr, int op); putimage puts the bit image previously saved with getimage back onto the screen, with the upper left corner of the image placed at (left, top). ptr points to the area in memory where the source image is stored. The op argument specifies a operator that controls how the color for each destination pixel on screen is computed, based on pixel already on screen and the corresponding source pixel in memory. c smiling face animation This animation using c draws a smiling face which appears at random position on screen. See output below the code, it will help you in understanding the code easily. C programming code #include<graphics.h> #include<conio.h> #include<stdlib.h>   main() { int gd = DETECT, gm, area, temp1, temp2, left = 25, top = 75; void *p;   initgraph(&gd,&gm,"C:\\TC\\BGI");   setcolor(YELLOW);