Skip to main content

Designing NOT gate using Transistor

A NOT gate has a single input and a single output. The definition of NOT gate states that if the input is 1 then the output is 0 and vice versa. The structure of the NOT gate is shown below.
The truth table of NOT gate is shown below.
Now to understand the working of NOT gate, you must understand how the transistor works as a switch. The transistor is shown in the figure below. A transistor is a 3 terminal device. The terminals are named as collector, base, and emitter as labeled below. To simply put, collector and emitter are the two ends of the switch. The closing and opening of this switch are controlled by supplying a small current ib to the base. When the base current (ib) is supplied to the transistor, the acts as a closed switch and the current flows from collector to emitter. When there is no base current, the transistor acts as an open circuit.

Having understood the working of the transistor as a switch let us understand the circuit diagram of NOT gate which is shown below.
Construction:- Vin is the input voltage. R2 is the base resistance. R1 is collector resistance. Q1 is and PNP transistor. VCC is a supply voltage of 5 volts. Vout is the output voltage.

Working:-
Case 1:- Vin = 0 V
In this case, as the input voltage is 0, there is no base current supplied to the transistor. thus the transistor acts as an open switch. Therefore, the path for current to flow from collector to emitter is blocked out. The only path left for the current flow is through Vout. Hence the output voltage is HIGH(5 V).

Case 2:- Vin = 5 V
In this case, since the input voltage is 5 v, the base current is supplied to the transistor. Thus the transistor acts as a closed switch and current flows from collector to the emitter to the ground. Therefore Vout is LOW(0 V).

Comments

Popular posts from this blog

Iris Detection | Python | OpenCv

 Hello there! Welcome to another blog. In this blog you are going to learn to detect iris using OpenCv python. Here is the video in case you missed it. So, let's get started. We will start by importing the necessary libraries. import cv2 import numpy as np Now, let us import the face and eye classifier files and set the camera resolution as follows. eye = cv2.CascadeClassifier( 'haarcascade_eye.xml' ) face = cv2.CascadeClassifier( 'haarcascade_frontalface_alt.xml' ) Kernal = np.ones(( 3 , 3 ) , np.uint8) #Declare kernal for morphology cap = cv2.VideoCapture( 0 ) cap.set(cv2.CAP_PROP_FRAME_WIDTH , 320 ) ##Set camera resolution cap.set(cv2.CAP_PROP_FRAME_HEIGHT , 240 ) In a while loop let us capture an image frame, flip it(in case your camera captures inverted images) and convert it into a gray scale image. ret , frame = cap.read() ##Read image frame frame = cv2.flip(frame , + 1 ) ##Flip the image in case your camera

Object Distance Calculation Using Contour Area Method In Python - Opencv

Today we will discuss how you can find the distance of an object from the camera using python OpenCV. Check out the video below. Before we continue, you should know how to detect a colored object. Click this link to check out my previous blog on object detection and tracking. I hope after checking out my previous blog, you are able to write your own code to detect and track objects. We will take forward the Object detection and tracking code to find the distance of an object from the camera. So let's start. Let us first understand the principle using which we will find the distance of the object from the camera. Principle:- Area enclosed by the contours of an object decreases as the object moves farther from the camera. This simply means that, if your object is near to the camera, the object will appear bigger. Thus the pixel area occupied by the object will be very large. As you move the object farther from the camera, the object size in the image will start to d

Object Detection And Tracking using Python - Opencv

Let us discuss today how you can detect and track an object in real-time. We will be using Python language and Opencv library for this purpose. Check out the video below. If you have read my previous blogs, you can directly skip down to the contour part. As usual, we need to make a few assumptions for the proper working of this application. This background is always static i.e. there is no addition or subtraction of objects in the background scene. The background-color is always constant. It does not change with time. The object that will be used for writing/painting is of a different color than the background to give us sufficient contrast between foreground and background. We are ready to begin now. Let us start by installing necessary python libraries for our project using  pip install.  We will be needing  Numpy  and  Opencv  libraries. Now create a python project and create a new script. Import the required libraries into python script as shown below. import cv2