Wednesday, 15 November 2017

INPUT DEVICES

INPUT-OUTPUT UNIT  

An I/O unit is a component of computer. The I/O unit is composed of two partsinput unit and
output unit. The input unit is responsible for providing input to the computer and the output unit
is for receiving output from the computer.
 


Input Unit
  •  The input unit gets the data and programs from various input devices and makes them available for processing to other units of the computer.

  •  The input data is provided through input devices, such askeyboard, mouse, trackball and joystick. Input data can also be provided by scanning images, voice recording, video recording, etc.
  •  Irrespective of the kind of input data provided to a computer, all input devices must translate the input data into a form that is understandable by the computer, i.e., in machine readable form. The transformation of the input data to machine readable form is done by the input interface of input device.

In brief, the input unit accepts input data from the user via input device, transforms the input data
in computer acceptable form using input interface for the input device and provides the
transformed input data for processing.
  

In addition to input devices and output devices, some devices function as both input and output
devices. The I/O devices provide the input to computer as well as get output from computer. The
I/O devices are used by both the input unit and the output unit. Hard disk drive, floppy disk
drive, optical disk drives are examples of I/O devices.

Input
Devices
Keyboard, Mouse, Digitizing Tablet, Track Ball, Joystick, Touch Screen, Light Pen,
Speech Recognition System, Digital camera, Scanner, Magnetic Ink Character
Recognition (MICR), Optical Character Recognition (OCR), Optical Mark
Recognition (OMR), Barcode Reader
Output
Devices
Monitor, Visual Display Terminal, Printer, Plotter, Computer Output on Microfi lm
(COM), Video Output System, Audio Response System
Input Output
Devices
  



INPUT DEVICESInput devices allow users and other applications to input data into the computer, for processing.
The data input to a computer can be in the form of text, audio, video, etc.

The data is entered manually by the user or with minimal user intervention. Input devices are classified as follows



  •  Human data entry devices
o Keyboardo Pointing devicesmouse, trackball, joystick, digitizing tableto Pick deviceslight pen, touch screen
  • Source data entry devices
o Audio inputspeech recognitiono Video inputdigital camerao Scannerhand-held scanner, flat-bed scannero Optical ScannerOCR, OMR, MICR, barcode reader

The input is provided to the computer using an input device, and must be translated to a form
that the computer can understand. The translation is done by the input interface of the input
device.
In addition to the above devices, the input to a computer can also be provided from a storage
device on the computer, another computer, or another piece of equipment, such as a musical
instrument, thermometer or sensors.
  


Keyboard

Features Keyboard is a common input device. It is provided along with the computer, and is
easy to use. It is used for entering the text data. For inputting the data, the user types the data
using the keyboard. When the data is being typed, the display monitor displays the typed data.
Cursor is a vertical line, an underscore, blinking line, etc. Cursor moves with each typed
character. The position of cursor indicates the location on monitor where the typed-in character
will be displayed.

Description The design of a keyboard is similar to a standard typewriter. The modern keyboards
are QWERTY keyboard (Q, W, E, R, T, Y are the sequence of keys in top row of letters).
Standard keyboard contains 101 keys which are arranged in the same order as a typewriter. The
keyboard has five sections (1) Typing keys (1, 2, 3…, A, B, C…), (2) Numeric keypad (numeric
keys on right side), (3) Function keys (F1, F2…. on top side), (4) Control keys (cursor keys, ctrl,
alt.…), and (5) Special
-purpose keys (Enter, shift, spacebar…). Some keyboards have 110 keys,where the extra keys are designed to work with the Windows operating system.

Working When a key is pressed, keyboard interacts with a keyboard controller and keyboard
buffer. The keyboard controller stores the code of pressed key in keyboard buffer and informs
the computer software that an action has happened on the keyboard. The computer software
checks and reads the keyboard buffer and passes the code of pressed character to the system
software. Due to a time gap between pressing of a key on keyboard and reading by the system
software, keyboard buffer is designed to store many keystrokes together.
  



keyboard


Pointing Devices

Pointing devices are used for providing the input to computer by moving the device to point to a
location on computer monitor. The input data is not typed; instead, the data is entered by moving
the pointing device. The cursor on the computer monitor moves with the moving pointing device.
Operations like move, click and drag can be performed using the pointing devices. Mouse,
trackball, joystick and digitizing tablet are some of the common pointing devices.


  Mouse

Features It is the most common pointing input device. The data is entered by pointing the mouse
to a location on the computer screen. The mouse may also be used to position the cursor on
screen, move an object by dragging, or select an object by clicking. The key benefit of using a
mouse is that the cursor moves with the mouse. So, the cursor can be positioned at any location
on the screen by simply moving the mouse. Moreover, it provides an easy way to select and
choose commands from menus, dialog boxes, icons, etc. Mouse is used extensively, while
working with graphics elements such as line, curve, shapes, etc.


Description Mouse is a small hand-held device having two or three buttons on its upper side. In
addition to the buttons, mouse also has a small wheel between the buttons.

. The wheel of the mouse is used for the up and down movement, for example, scrolling a
long document. A mouse is classified as physical mouse or optical mouse.

Physical Mouse has a rubber ball on the bottom side that protrudes when the mouse is moved. It
requires a smooth, dust free surface, such as a mouse pad, on which it is rolled.
Optical Mouse uses a Light Emitting Diode (LED) and a sensor to detect the movement of
mouse. Optical mouse requires an opaque flat surface underneath it. Optical mouse was
introduced by Microsoft in 1999. Optical mouse is better than physical mouse as there is no
moving part that can cause wear and tear, and dirt cannot get inside it.

Working In a physical mouse, rollers and sensors are used to sense the direction and rate of
movement of mouse. When the ball of mouse moves, the rollers sense the horizontal and vertical
movement and sensors sense the speed of movement. This information is passed to computer via
the mouse chord. When an
optical mouse is moved, a beam of light is reflected from its
underside. These pulses of light determine the direction and rate of movement. This information
is sent to computer via the mouse chord.

Using the mouse The mouse can be used in five different ways, as follows
  •  Pointing points to a location or object on the computer screen. Moving the mouse by hand moves the cursor on computer screen. The cursor moves in the direction in which the mouse moves.
  •  Left Click or Click means pressing the left button of mouse and releasing it. Clicking issused to  select a button, command or icon on the screen.
  •  Right Click involves pressing the right button on mouse and releasing it. Right click displays a menu that contains options like cut, copy, paste, font, paragraph, etc. for the item on which the mouse is pointing.
  •  Double Click means pressing the left button of mouse twice successively, without moving the mouse, and then releasing the mouse. It is used to start a program or open a folder.
 Drag and Drop drags an object and drops it at another location. Drag means pointing mouse to an object on screen, pressing the left button of mouse, keeping it pressed and moving the mouse to point to a new location. The object gets dragged to the new location along with the mouse. When the left button of mouse is released, the object gets dropped at the new location. Drag and drop is used for moving folders, files and icons to new locations on the screen.



A Mouse
  Track Ball
Features Trackball is a device that is a variant of the mouse but has the functionality of mouse.
It is easy to use and takes less space than a mouse. Trackball is generally built in laptops since
there is no space for the mouse to move on the lap. Trackballs come in various sizes
small and
big.


Description
Trackball looks like an upside-down mouse. Instead of moving the whole device to
move the cursor on computer screen, trackball requires the ball to be rotated manually with a
finger. The trackball device remains stationary. The cursor on the computer screen moves in the
direction in which the ball is moved. The buttons on trackball are used in the same way as mouse
buttons. 

Working Trackball works in the same way as a physical mouse.  


Trackball




Joystick

Features Joystick is a device which is commonly used for playing video games.
Joystick is mainly used to control the speed of the cursor and is thus popular in games involving
speed like racing and flying games. The direction of push of the stick and the amount of
deflection determines the change in position and the change in speed, respectively.
joystick

Description It is a stick with its base attached to a flexible rubber sheath inside a plastic cover.
The plastic cover contains the circuit that detects the movement of stick and sends the
information to computer. The position of the stick movement is given by the x and y coordinates
of the stick.



 Digitizing Tablet

Features It is an input device used primarily to input drawings, sketches, etc. Digitizing tablet is
used for Computer Aided Design (CAD) for the design of buildings, automotive designs, and
designing of maps, etc.

Description Digitizing tablet consists of two partselectronic tablet and pen. The electronic
tablet is a flat bed tablet. The pen looks like a ball pen but has an electronic head. The pen in
moved on the tablet. Each position on the tablet corresponds to a fixed position on the screen.
Drawings can be made on the tablet using a pen, and is provided as input to computer, where, a
location on the tablet corresponds to a specific location on the screen.

Digitizing Tablet


Working The tablet contains circuit that can detect the movement of pen on the tablet, convert
the movements into digital signals and send the digital signal to the computer.



 Pick Devices

Pick devices are used for providing input to the computer by pointing to a location on the
computer monitor. The input data is not typed; the data is entered by pointing the pick device
directly on the computer screen. Light pen and touch screen are some common pick devices.


Light Pen

Features It is a light sensitive pen-like input device and is used to select objects directly on the
computer screen. It is used for making drawing, graphics and for menu selection. Figures and
drawings can be made by moving the pen on computer screen.

Description and Working The pen contains a photocell in a small tube. When the pen is moved
on the screen, light from the screen at the location of pen causes the photocell to respond. The
electric response is transmitted to the computer that can identify the position on screen at which
the light pen is pointing. 




light pen




 Touch Screen

touch screen ATM machine
Features It is an input device that accepts input when the user places a fingertip on the computer
screen. The computer selects the option from the menu of screen to which the finger points.
Touch screen are generally used in applications like Automated Teller Machine (ATM), public
information computers like hospitals, airline reservation, railway reservation, supermarkets, etc.

Description Touch screen consists of a clear glass panel that is placed over the view area of
computer screen. In addition to the glass panel with sensors, it has a device driver, and a
controller that translates the information captured by the glass panel sensors to a form that the
computer can understand.

Working Touch screens have an infrared beam that criss-cross the surface of screen. When a
fingertip is touched on the screen, the beam is broken, and the location is recorded. Some touch
screens have ultrasonic acoustic waves that cross the surface of screen. When a fingertip is
touched on the screen, the wave is interrupted, and the location is recorded. The recorded
location is sent to the computer via the controller of touch screen, in a form that the computer
can understand.


 SOURCE DATA ENTRY DEVICES

Source data entry devices are used for audio input, video input and to enter the source document
directly to the computer. Source data entry devices do not require data to be typed-in, keyed-in or
pointed to a particular location.

 Audio Input Device

Audio input can be provided to the computer using human voice or speech. Audio input to the
computer can be used for different purposes. It can be used for making telephone calls, for audio
and video conferencing over Internet, to record voice, to create audio files and embed these files
to be sent over e-mail, or, to translate spoken words into text, etc.

Audio input devices like a
microphone is used to input a person’s voice into the computer. A
sound card 
translates analog audio signals from microphone into digital codes that the computer can store and process. Sound card also translates back the digital sound into analog signals that can be sent to the speakers. Translating spoken words into text is also known as speech recognition or voice recognition. The audio input along with the software for voice recognition forms the speech recognition system or voice recognition system.

The computer can be operated using voice commands. The user can dictate the commands to the
computer, instead of typing them. The computer has to be trained to recognize the voice of user
using the speech patterns and pronunciation of words. The system thus adapts to the voice of
user. Speech recognition systems are costly and difficult to develop. They are generally used by
people who have difficulty in typing, people with disabilities or by corporate world for dictation.
Audio input can be recorded on an mp3 recorder and provided as an input to computer. Open
source software like Audacity is used for recording and editing of audio files .


Video Input Device

Video input is provided to the computer using video camera and digital camera
Video camera can capture full motion video images. The images are digitized and can be
compressed and stored in the computer disk. Webcam is a common video camera device. It is
placed on the computer above the screen to capture the images of the user who is working on the
computer. A video capture card allows the user to connect video devices like camcorders to the
computer.


Digital camera works like video camera but can capture still images. The digital camera digitizes
images, compresses them and stores them on a memory card like flash memory. The information
from the digital camera can be brought into the computer and stored. The video files can be
edited using software like VLC media player. Computer vision is an area of computer science
that deals with images. Computer vision has applications in areas like robotics and industrial
processing.
  




Monday, 6 November 2017

THE COMPUTER SYSTEM HARDWARE

CENTRAL PROCESSING UNIT  

Central Processing Unit (CPU) or the processor is also often called the brain of computer. CPU consists of Arithmetic Logic Unit (ALU) and Control Unit (CU). In addition, CPU
also has a set of registers which are temporary storage areas for holding data, and instructions.
ALU performs the arithmetic and logic operations on the data that is made available to it. CU is
responsible for organizing the processing of data and instructions.
CU controls and coordinates
the activity of the other units of computer. CPU uses the registers to store the data, instructions
during processing.
CPU executes
the stored program instructions, i.e. instructions a
nd data are stored in memory
before execution. For processing, CPU gets data and instructions from the memory. It interprets
the program instructions and performs the arithmetic and logic operations required for the
processing of data. Then, it sends the processed data or result to the memory. CPU also acts as an
administrator and is responsible for supervising operations of other parts of the computer.
The CPU is fabricated as a single Integrated Circuit (IC) chip, and is also known as the
microprocessor. The microprocessor is plugged into the motherboard of the computer
(
Motherboard is a circuit board that has electronic circuit etched on it and connects the
microprocessor with the other hardware components).


Block diagram of CPU



Arithmetic Logic Unit

  •  ALU consists of two unitsarithmetic unit and logic unit.
  •  The arithmetic unit performs arithmetic operations on the data that is made available to it.
Some of the arithmetic operations supported by the arithmetic unit areaddition,
subtraction, multiplication and division.

  •  The logic unit of ALU is responsible for performing logic operations. Logic unit performs comparisons of numbers, letters and special characters. Logic operations include testing for greater than, less than or equal to condition.

  •  ALU performs arithmetic and logic operations, and uses registers to hold the data that is being processed.

 Registers

  •  Registers are high-speed storage areas within the CPU, but have the least storage capacity. Registers are not referenced by their address, but are directly accessed and manipulated by the CPU during instruction execution.

  •  Registers store data, instructions, addresses and intermediate results of processing. Registers are often referred to as the CPU’s working memory.

  •  The data and instructions that require processing must be brought in the registers of CPU before they can be processed. For example, if two numbers are to be added, both numbers are brought in the registers, added and the result is also placed in a register.

  •  Registers are used for different purposes, with each register serving a specific purpose.
Some of the important registers in CPU are as followso Accumulator (ACC) stores the result of arithmetic and logic operations.o Instruction Register (IR) contains the current instruction most recently fetched.o Program Counter (PC) contains the address of next instruction to be processed.o Memory Address Register (MAR) contains the address of next location in the
memory to be accessed.
o Memory Buffer Register (MBR) temporarily stores data from memory or the data
to be sent to memory.
o Data Register (DR) stores the operands and any other data.

  •  The number of registers and the size of each (number of bits) register in a CPU helps to determine the power and the speed of a CPU.
  •  The overall number of registers can vary from about ten to many hundreds, depending on the type and complexity of the processor.
  • The size of register, also called word size, indicates the amount of data with which the computer can work at any given time. The bigger the size, the more quickly it can process data. The size of a register may be 8, 16, 32 or 64 bits. For example, a 32bit CPU is one in which each register is 32 bits wide and its CPU can manipulate 32 bits of data at a time. Nowadays, PCs have 32bit or 64bit registers.
 32-bit processor and 64-bit processor are the terms used to refer to the size of the registers. Other factors remaining the same, a 64-bit processor can process the data twice as fast as one with 32-bit processor.








Control Unit

  •  The control unit of a computer does not do any actual processing of data. It organizes the processing of data and instructions. It acts as a supervisor and, controls and coordinates the activity of the other units of computer.
 CU coordinates the input and output devices of a computer. It directs the computer to carry out stored program instructions by communicating with the ALU and the registers. CU uses the instructions in the Instruction Register (IR) to decide which circuit needs to be activated. It also instructs the ALU to perform the arithmetic or logic operations. When a program is run, the Program Counter (PC) register keeps track of the program instruction to be executed next.


  •  CU tells when to fetch the data and instructions, what to do, where to store the results, the sequencing of events during processing etc.
  • CU also holds the CPU’s Instruction Set, which is a list of all operations that the CPU can perform.
The function of a (CU) can be considered synonymous with that of a conductor of an orchestra.
The conductor in an orchestra does not perform any work by itself but manages the orchestra and
ensures that the members of orchestra work in proper coordination.


 MEMORY UNIT

The memory unit consists of cache memory and primary memory. Primary memory or main
memory
of the computer is used to store the data and instructions during execution of the
instructions. Random Access Memory (RAM) and Read Only Memory (ROM) are the primary
memory. In addition to the main memory, there is another kind of storage device known as the
secondary memory. Secondary memory is non-volatile and is used for permanent storage of data
and programs. A program or data that has to be executed is brought into the RAM from the
secondary memory.


 Cache Memory

  •  The data and instructions that are required during the processing of data are brought from the secondary storage devices and stored in the RAM. For processing, it is required that the data and instructions are accessed from the RAM and stored in the registers. The time taken to move the data between RAM and CPU registers is large. This affects the speed of processing of computer, and results in decreasing the performance of CPU.
  • Cache memory is a very high speed memory placed in between RAM and CPU. Cache memory increases the speed of processing.
  • Cache memory is a storage buffer that stores the data that is used more often, temporarily, and makes them available to CPU at a fast rate. During processing, CPU first checks cache for the required data. If data is not found in cache, then it looks in the RAM for data.
  •  To access the cache memory, CPU does not have to use the motherboard’s system bus for data transfer. (The data transfer speed slows to the motherboard’s capability, when data is passed through system bus. CPU can process data at a much faster rate by avoiding the system bus.)
Illustration of cache memeory

  •  Cache memory is built into the processor, and may also be located next to it on a separate chip between the CPU and RAM. Cache built into the CPU is faster than separate cache, running at the speed of the microprocessor itself. However, separate cache is roughly twice as fast as RAM.
  • The CPU has a built-in Level 1 (L1) cache and Level2 (L2) cache. In addition to the built-in L1 and L2 cache, some CPUs have a separate cache chip on the motherboard. This cache on the motherboard is called Level 3 (L3) cache. Nowadays, high-end processor comes with built-in L3 cache, like in Intel core i7. The L1, L2 and L3 cache store the most recently run instructions, the next ones and the possible ones, respectively. Typically, CPUs have cache size varying from 256KB (L1), 6 MB (L2), to 12MB (L3) cache.
  •  Cache memory is very expensive, so it is smaller in size. Generally, computers have cache memory of sizes 256 KB to 2 MB.


Primary Memory
  •  Primary memory is the main memory of computer. It is used to store data and instructions during the processing of data. Primary memory is semiconductor memory.
  • Primary memory is of two kindsRandom Access Memory (RAM) and Read Only Memory (ROM).
  •  RAM is volatile. It stores data when the computer is on. The information stored in RAM gets erased when the computer is turned off. RAM provides temporary storage for data and instructions.
  •  ROM is non-volatile memory, but is a read only memory. The storage in ROM is permanent in nature, and is used for storing standard processing programs that permanently reside in the computer. ROM comes programmed by the manufacturer.
  •  RAM stores data and instructions during the execution of instructions. The data and instructions that require processing are brought into the RAM from the storage devices like hard disk. CPU accesses the data and the instructions from RAM, as it can access it at a fast speed than the storage devices connected to the input and output unit .
  • The input data that is entered using the input unit is stored in RAM, to be made available during the processing of data. Similarly, the output data generated after processing is stored in RAM before being sent to the output device. Any intermediate results generated during the processing of program are stored in RAM.
 RAM provides a limited storage capacity, due to its high cost.

Interaction of CPU with memory  


 Secondary Memory

  • The secondary memory stores data and instructions permanently. The information can be stored in secondary memory for a long time (years), and is generally permanent in nature unless erased by the user. It is a non-volatile memory.
  •  It provides back-up storage for data and instructions. Hard disk drive, floppy drive and optical disk drives are some examples of storage devices.
  •  The data and instructions that are currently not being used by CPU, but may be required later for processing, are stored in secondary memory.
  •  Secondary memory has a high storage capacity than the primary memory.
  •  Secondary memory is also cheaper than the primary memory.
  • It takes longer time to access the data and instructions stored in secondary memory than in primary memory.
Magnetic tape drives, disk drives and optical disk drives are the different types of storage
devices.


 INSTRUCTION FORMAT

A computer program is a set of instructions that describe the steps to be performed for carrying
out a computational task. The program and the data, on which the program operates, are stored in
main memory, waiting to be processed by the processor. This is also called the
stored program
concept
.
An instruction is designed to perform a task and is an elementary operation that the processor can
accomplish. An instruction is divided into groups called fields. The common fields of an
instruction are
Operation (op) code and Operand code . The remainder of the
instruction fields differs from one computer type to other. The
operation code represents action
that the processor must execute. It tells the processor what basic operations to perform. The
operand code defines the parameters of the action and depends on the operation. It specifies the
locations of the data or the operand on which the operation is to be performed. It can be data or a
memory address.

The number of bits in an instruction varies according to the type of data (could be between 8 and
32 bits).
shows the instruction format for ADD command.


 INSTRUCTION SET

A processor has a set of instructions that it understands, called as instruction set. An instruction
set or an instruction set architecture is a part of the computer architecture. It relates to
programming, instructions, registers, addressing modes, memory architecture, etc. An
Instruction
Set
is the set of all the basic operations that a processor can accomplish. The instructions in the instruction set are the language that a processor understands. All programs have to communicate with the processor using these instructions. An instruction in the instruction set involves a series of logical operations (may be thousands) that are performed to complete each task. The instruction set is embedded in the processor (hardwired), which determines the machine language for the processor. All programs written in a high-level language are compiled and translated into machine code before execution, which is understood by the processor for which the program has been coded.
Two processors are different if they have different instruction sets. A program run on one
computer may not run on another computer having a different processor.
Two processors are
compatible if the same machine level program can run on both the processors. Therefore, thesystem software is developed within the processor’s instruction set.Microarchitecture is the processor design technique used for implementing the Instruction Set.
Computers having different microarchitecture can have a common Instruction Set. Pentium and
Athlon CPU chips implement the x86 instruction set, but have different internal designs.
2.6 INSTRUCTION CYCLEThe primary responsibility of a computer processor is to execute a sequential set of instructions
that constitute a program. CPU executes each instruction in a series of steps, called
instruction
cycle
.
  •  A instruction cycle involves four steps
o Fetching The processor fetches the instruction from the memory. The fetched
instruction is placed in the
Instruction Register. Program Counter holds the
address of next instruction to be fetched and is incremented after each fetch.
o Decoding The instruction that is fetched is broken down into parts or decoded.
The instruction is translated into commands so that they correspond to those in the
CPU’s instruction set. The instruction set architecture of the CPU defines the wayin which an instruction is decoded.o Executing The decoded instruction or the command is executed. CPU performs
the operation implied by the program instruction. For example, if it is an ADD
instruction, addition is performed.
o Storing CPU writes back the results of execution, to the computer’s memory.
Figure 2.8 Instruction cycleFigure 2.9 Steps in instruction cycle
  •  Instructions are of different categories. Some categories of instructions are
o Memory access or transfer of data between registers.o Arithmetic operations like addition and subtraction.o Logic operations such as AND, OR and NOT.o Control the sequence, conditional connections, etc.
A CPU performance is measured by the number of instructions it executes in a second, i.e., MIPS(million instructions per second), or BIPS (billion instructions per second)