Search This Blog

Wednesday, January 12, 2011

Logic Gates and its functions

An Introduction to Logic Gates


This web site provides a brief description of logic gates and defines a few of the common logic gates found in simple digital circuits. 


The navigation bar provides links to pages where you can view the symbol, truth table, and animation of particular logic gates and a sample circuit.


Digital Logic


Keep in mind that computers work on an electrical flow where a high voltage is considered a 1 and a low voltage is considered a 0.  Using these highs and lows, data are represented.  Electronic circuits must be designed to manipulate these positive and negative pulses into meaningful logic.


Logic gates are the building blocks of digital circuits.  Combinations of logic gates form circuits designed with specific tasks in mind.  For example, logic gates are combined to form circuits to add binary numbers (adders), set and reset bits of memory (flip flops), multiplex multiple inputs, etc.

AND GATE :  


Logic Gate:
      The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are high.  A dot (.) is used to show the AND operation i.e. A.B.  Bear in mind that this dot is sometimes omitted i.e. AB


Truth Table:-

Block Diagram of a computer


A computer can process data, pictures, sound and graphics. They can solve highly complicated problems quickly and accurately.


Input Unit:
Computers need to receive data and instruction in order to solve any problem. Therefore we need to input the data and instructions into the computers. The input unit consists of one or more input devices. Keyboard is the one of the most commonly used input device. Other commonly used input devices are the mouse, floppy disk drive, magnetic tape, etc. All the input devices perform the following functions.


Accept the data and instructions from the outside world.
Convert it to a form that the computer can understand.
Supply the converted data to the computer system for further processing.


Storage Unit:
                        The storage unit of the computer holds data and instructions that are entered through the input unit, before they are processed. It preserves the intermediate and final results before these are sent to the output devices. It also saves the data for the later use. The various storage devices of a computer system are divided into two categories.
1. Primary Storage: 
                         Stores and provides very fast. This memory is generally used to hold the program being currently executed in the computer, the data being received from the input unit, the intermediate and final results of the program. The primary memory is temporary in nature. The data is lost, when the computer is switched off. In order to store the data permanently, the data has to be transferred to the secondary memory.
The cost of the primary storage is more compared to the secondary storage. Therefore most computers have limited primary storage capacity.
2. Secondary Storage
                       Secondary storage is used like an archive. It stores several programs, documents, data bases etc. The programs that you run on the computer are first transferred to the primary memory before it is actually run. Whenever the results are saved, again they get stored in the secondary memory. The secondary memory is slower and cheaper than the primary memory. Some of the commonly used secondary memory devices are Hard disk, CD, etc.,


Memory Size:
                      All digital computers use the binary system, i.e. 0’s and 1’s. Each character or a number is represented by an 8 bit code.
The set of 8 bits is called a byte.
A character occupies 1 byte space.
A numeric occupies 2 byte space.
Byte is the space occupied in the memory.


The size of the primary storage is specified in KB (Kilobytes) or MB (Megabyte). One KB is equal to 1024 bytes and one MB is equal to 1000KB. The size of the primary storage in a typical PC usually starts at 16MB. PCs having 32 MB, 48MB, 128 MB, 256MB memory are quite common.


Arithmetic Logical Unit:
All calculations are performed in the Arithmetic Logic Unit (ALU) of the computer. It also does comparison and takes decision. The ALU can perform basic operations such as addition, subtraction, multiplication, division, etc and does logic operations viz, >, <, =, ‘etc. Whenever calculations are required, the control unit transfers the data from storage unit to ALU once the computations are done, the results are transferred to the storage unit by the control unit and then it is send to the output unit for displaying results.


Control Unit:
It controls all other units in the computer. The control unit instructs the input unit, where to store the data after receiving it from the user. It controls the flow of data and instructions from the storage unit to ALU. It also controls the flow of results from the ALU to the storage unit. The control unit is generally referred as the central nervous system of the computer that control and synchronizes its working.


Central Processing Unit:
The control unit and ALU of the computer are together known as the Central Processing Unit (CPU). The CPU is like brain performs the following functions:
It performs all calculations.
It takes all decisions.
It controls all units of the computer.
A PC may have CPU-IC such as Intel 8088, 80286, 80386, 80486, Celeron, Pentium, Pentium Pro, Pentium II, Pentium III, Pentium IV, Dual Core, and AMD etc.



Output Unit:
                      The output unit of a computer provides the information and results of a computation to outside world. Printers, Visual Display Unit (VDU) are the commonly used output devices. Other commonly used output devices are floppy disk drive, hard disk drive, and magnetic tape drive.

Hardware Basics

Computer :-

The word "computer" comes from the word "compute" which means to calculate. So a computer is normally considered to be a calculating device that can perform arithmetic operations at enormous speed. In fact, the original objective for inventing the computer was to create a fast calculating machine. But more than 80% of the work done by the computers today is of non-mathematical or non-numerical nature.


More accurately, a computer may be defined as a device that operates upon information or data. Data can be anything like bio-data of various applicants when the computer is used for recruiting personnel or the marks obtained by various students in various subjects when the computer is used to prepare results, etc. The data comes in various shapes and sizes depending upon the type of computer application. A computer can store, process and retrieve data as and when desired. 


Today's computers are electronic devices, and electronic signals are all it can understand. Because of this, it was necessary to develop a code that could translate things like numbers and letters (which the computer can not recognize) into electronic symbols. Any electronic device understands two states (on or off), this was used as the building block for this code. This on/off (1=on and 0=off) state is called a binary digit or bit. Since this is such a small amount of information, it is usually easier to talk about bytes of information ( a byte is a set of eight bits). By grouping the bits in groups of eight, we have the ability to represent up to 256 different codes. 


A basic computer has four key components, the CPU (Central Processing Unit) or processor or microprocessor, input and output (I/O) expansion such as keyboard, display and disk storage. Other components primarily support them, such as the motherboard, buses, expansion cards or power supply unit. The motherboard brings together individual boards that used to be housed separately, before personal computers. The processor, memory, serial ports, parallel port, keyboard interface, disk interface and buses. The processor executes instructions at low level and knows how to add, subtract and simple logical functions. The computers memory is workspace for all activity and is limited by the size. The number and variety of applications that can be made available at any one time is largely determined by the amount of memory, usually in megabytes (MB), millions of bytes (kilobytes are thousands of bytes, KB). Input and output (I/O) is used by the computer to read and write data using I/O devices called peripherals, including the monitor, printer or storage devices. Storage devices are used to keep data stored, when it is not in the computers memory.