Tuesday 21 October 2014

Boolean Algebra

Boolean Algebra

The Boolean algebra was developed by the English mathematician George Boole; it deals with statements in mathematical logic, and puts them in the form of algebraic equations. The Boolean algebra was further developed by the modern American mathematician Claude Shannon, in order to apply it to computers. The basic techniques described by Shannon were adopted almost universally for the design and analysis of switching circuits. Because of the analogous relationship between the actions of relays, and of modern electronic circuits, the same techniques which were developed for the design of relay circuits are still being used in the design of modern high speed computers. Thus the Boolean algebra founds its applications in modern computers after almost one hundred years of its discovery.

Boolean algebra is used in designing of logic circuits inside the computer. These circuits perform different types of logical operations. Thus, Boolean algebra is also known as logical algebra or switching algebra. The mathematical expressions of the Boolean algebra are called Boolean expressions. Boolean algebra describes the Boolean expressions used in the logic circuits. The Boolean expressions are simplified by means of basic theorems. The expressions that describe the logic circuits are also simplified by using Boolean theorems.
Boolean algebra is now being used extensively in designing the circuitry used in computers. In short, knowledge of Boolean-algebra is must in the computing field.

DEFINITIONS

Constants

Boolean algebra uses binary values 0 and 1 as Boolean constants.

Variable
The variables used in the Boolean algebra are represented by letters such as A, B, C, x, y, z etc, with each variable having one of two and only two distinct possible values 0 and 1.

Truth Table

It is defined as systematic listing of the values for the dependent variable in terms of all the possible values of independent variable. It can also be defined as a table representing the condition of input and output circuit involving two or more variables. In a binary system, there is 2(n) number of combinations, where n is the number of variables being used for e.g. each combination of the value of x and y, there is value of z specified by the definition. These definitions may listed in compact form using “Truth Tables”. Therefore a truth table is able of all possible combinations of the variables.

AND Operation

In Boolean algebra AND operator is represented by a dot or by the absence of any symbol between the two variables and is used for logical multiplication. For example A.B = X or AB = X.
Thus X is 1 if both A and B are equal to 1 otherwise X will be 0 if either or both A and B are 0 i.e.
1.1 = 1
1.0 = 0
0.1 = 0
0.0 = 0

OR Operation

OR operation is represented by a plus sign between two variables. In Boolean algebra OR is used for logical addition. For example A+B = X.
The resulting variable X assumes the value 0 only when both A and B are 0, otherwise X will be 1 if either or both of A and B are 1 i.e.
1+1 = 1
1+0 = 1
0+1 = 1
0+0 = 0

Laws of Boolean Algebra

As in other areas of mathematics, there are certain well-defined rules and laws that must be followed in order to properly apply Boolean algebra. There are three basic laws of Boolean algebra; these are the same as ordinary algebra.
1.     Commutative Law
2.     Associative Law
3.     Distributive Law

1.     Commutative Law

It is defined as the law of addition for two variables and it is written as:
A + B = B + A
This law states that the order in which the variables are added makes no difference. Remember that in Boolean algebra addition and OR operation are same. It is also defined as the law of multiplication for two variables and it is written as:
A.B = B.A

2.     Associative Law

The associative law of addition is written as follows for three variables:
A + (B + C) = (A + B) + C
This law states that when Oring more than two variables, the result is the same regardless of the grouping of the variables.
The associative law of multiplication is written as follows for three variables.
A(BC) = (AB)C
This law states that it makes no difference in what order the variables are grouped when ANDing more than two variables.

3.     Distributive Laws

The distributive law is written for three variables is as follows:
A(B+C) = AB + AC
This law states that ORing two or more variables and then ANDin the result with a single variable is equivalent to ANDing the single variable with each of the two or more variables and then ORing the products. The distributive law also expresses the process of factoring in which the common variable A is factored out of the product terms. Forexample:
AB + AC = A (B + C).

Sunday 19 October 2014

Input Output Devices



The computer will be of no use unless it is able to communicate with the outside world. Input/Output devices are required for users to communicate with the computer. In simple terms, input devices bring information INTO the computer and output devices bring information OUT of a computer system. These input/output devices are also known as peripherals since they surround the CPU and memory of a computer system.
Some commonly used Input/Output devices are listed in table below.


 Input Devices


(a) Keyboard

It is a text base input device that allows the user to input alphabets, numbers and other
characters. It consists of a set of keys mounted on a board.



Alphanumeric Keypad

It consists of keys for English alphabets, 0 to 9 numbers, and special characters like + / * ( ) etc.

Function Keys

There are twelve function keys labeled F1, F2, F3… F12. The functions assigned to these keys differ from one software package to another. These keys are also user programmable keys.

Special-function Keys

These keys have special functions assigned to them and can be used only for those specific purposes. 

Functions of some of the important keys are defined below.

  • Enter

It is similar to the ‘return’ key of the typewriter and is used to execute a command or program.

  • Space bar

It is used to enter a space at the current cursor location.

  • Backspace

This key is used to move the cursor one position to the left and also delete the character in that position.

  • Delete

It is used to delete the character at the cursor position.

  • Insert

Insert key is used to toggle between insert and overwrite mode during data entry.

  • Shift

This key is used to type capital letters when pressed along with an alphabet key. Also used to type the special characters located on the upper-side of a key that has two characters defined on the same key.

  • Caps Lock

Cap Lock is used to toggle between the capital lock features. When ‘on’, it locks the alphanumeric keypad for capital letters input only.


  •  Tab

Tab is used to move the cursor to the next tab position defined in the document. Also, it is used to insert indentation into a document.

  • Ctrl
Control key is used in conjunction with other keys to provide additional functionality on the keyboard.

  • Alt

Also like the control key, Alt key is always used in combination with other keys to perform specific tasks.

  • Esc

This key is usually used to negate a command. Also used to cancel or abort executing programs.

  • Numeric Keypad

Numeric keypad is located on the right side of the keyboard and consists of keys having numbers (0 to 9) and mathematical operators (+ * /) defined on them. This keypad is provided to support quick entry for numeric data.

  • Cursor Movement Keys

These are arrow keys and are used to move the cursor in the direction indicated by the arrow (up, down, left, right).




(b) Mouse

The mouse is a small device used to point to a particular place on the screen and select in order to perform one or more actions. It can be used to select menu commands, size windows, start programs etc.

The most conventional kind of mouse has two buttons on top: the left one being used most frequently.

 
Mouse Actions


  • Left Click : Used to select an item.



  • Double Click : Used to start a program or open a file.



  • Right Click : Usually used to display a set of commands.


Drag and Drop : It allows you to select and move an item from one location to another. To achieve this place the cursor over an item on the screen, click the left mouse button and while holding the button down move the cursor to where you want to place the item, and then release it.


(c) Joystick

The joystick is a vertical stick which moves the graphic cursor in a direction the stick is moved. It typically has a button on top that is used to select the option pointed by the cursor. 
 
Joystick is used as an input device primarily used with video games, training simulators and controlling robots.


(d)Scanner

Scanner is an input device used for direct data entry from the source document into the computer system. It converts the document image into digital form so that it can be fed into the computer.
  

(e) Bar codes Reader

A bar code is a set of lines of different thicknesses that represent a number. Bar Code Readers are used to input data from bar codes.

 

 Most products in shops have bar codes on them.Bar code readers work by shining a beam of light on the lines that make up the bar code and detecting the amount of light that is reflected back.



(f) Light Pen

 It is a pen shaped device used to select objects on a display screen. It is quite like the mouse (in its functionality) but uses a light pen to move the pointer and select any object on the screen by pointing to the object.
 

Users of Computer Aided Design (CAD) applications commonly use the light pens to directly draw on screen.



(g)Digital camera

A digital camera can store many more pictures than an ordinary camera. Pictures taken using a digital camera are stored inside its memory and can be transferred to a computer by connecting the camera to it. A digital camera takes pictures by converting the light passing through the lens at the front into a digital image.






(h) The Speech Input Device

The “Microphones - Speech Recognition” is a speech Input device. To operate it we require using a microphone to talk to the computer. Also we need to add a sound card to the computer. The Sound card digitizes audio input into 0/1s .A speech recognition program can process the input and convert it into machine-recognized commands or input.



Output Devices


(a) Monitor

Monitor is an output device that resembles the television screen and uses a Cathode Ray Tube (CRT) to display information. It also displays the program or application output. Like the television, monitors are also available in different sizes. 

Now a days we use  Liquid Crystal Display (LCD). LCD are smaller and lighter than cathode ray tube monitors, they consumed less power then CRT Monitors.







(b) Printer

Printers are used to produce paper (commonly known as hardcopy) output. Based on the technology used.
 

They can be classified as Impact or Non-impact printers.

Impact printers use the typewriting printing mechanism wherein a hammer strikes the paper through a ribbon in order to produce output. Dot-matrix and Character printers fall under this category.
 

Non-impact printers do not touch the paper while printing. They use chemical, heat or electrical signals to etch the symbols on paper. Inkjet, Deskjet, Laser, Thermal printers fall under this category of printers.

 


(c) Plotter

Plotters are used to print graphical output on paper. It interprets computer commands and makes line drawings on paper using multicolored automated pens. It is capable of producing graphs, drawings, charts, maps etc.


 

Computer Aided Engineering (CAE) applications like CAD (Computer Aided Design) and CAM (Computer Aided Manufacturing) are typical usage areas for plotters.