Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

Unit 4 — Peripheral Devices

Lesson 38 of 49 in the free Computer Organization and Architecture notes on Siksha Sarovar, written by Rohit Jangra.

Peripheral Devices

Peripherals are the electromechanical and electromagnetic devices connected to a computer that provide input, output or auxiliary storage. They are outside the CPU-memory core.

1. Why Peripherals Need an Interface

   Four fundamental mismatches between the CPU and a peripheral:

   1. SPEED       : CPU works in nanoseconds; a keyboard in
                    hundreds of milliseconds. Ratio can exceed 10^6.

   2. DATA FORMAT : peripherals may be serial, byte-wide, or use a
                    different code (ASCII, Unicode, analogue voltages);
                    the CPU works in fixed-width parallel words.

   3. SIGNAL LEVEL: peripherals may use 12 V (RS-232) or analogue
                    signals; the CPU uses 3.3 V / 5 V logic.

   4. OPERATING MODE: each device has its own control protocol; the
                    CPU should not have to know the details.

   -> Therefore every peripheral is connected through an INTERFACE UNIT.

2. Classification by Function

CategoryDevicesDirection
InputKeyboard, mouse, joystick, scanner, barcode reader, microphone, webcam, touchscreen, sensors, OMR/OCR/MICR readersDevice → CPU
OutputMonitor (CRT/LCD/LED/OLED), printer, plotter, speaker, projector, actuatorsCPU → Device
StorageHDD, SSD, optical disc, magnetic tape, USB flash, memory cardBoth
CommunicationNIC, modem, Wi-Fi adapter, BluetoothBoth

3. Input Devices in Detail

DeviceWorking principleTypical rate
KeyboardKey press closes a switch in a row-column matrix; an encoder produces the scan code~10 chars/s
MouseOptical sensor images the surface and computes displacement~100 reports/s
ScannerA CCD/CIS array converts reflected light to pixel valuesMinutes per page
MICRMagnetic Ink Character Recognition — used on bank chequesFast, very reliable
OMROptical Mark Recognition — detects pencil marks (OMR answer sheets)Very fast
OCROptical Character Recognition — converts scanned images to textSoftware-dependent
Barcode readerLaser/CCD reads the reflectance pattern of the barsInstant
Touch screenResistive (pressure) or capacitive (charge change)Continuous

4. Output Devices in Detail

Monitors

TypeTechnologyNotes
CRTElectron beam scans a phosphor screenObsolete; bulky, high power
LCDLiquid crystals modulate a backlightThin, low power
LEDLCD with an LED backlightBetter contrast
OLEDEach pixel emits its own lightTrue blacks, no backlight
   Resolution and memory:

   A 1024 x 768 display with 24-bit colour needs:
      1024 x 768 x 3 bytes = 2,359,296 bytes ≈ 2.25 MB of video RAM per frame.

   At 60 frames per second:
      2.25 MB x 60 = 135 MB/s of bandwidth.

Printers

CategoryTypePrincipleQuality / speed
ImpactDot matrixPins strike an inked ribbonLow quality, can print carbon copies
ImpactDaisy wheelFully formed characters strike a ribbonLetter quality, very slow
ImpactLine printerPrints a whole line at a timeVery fast, low quality
Non-impactInkjetDroplets sprayed onto paperGood quality, cheap printer
Non-impactLaserLaser writes a charge image on a drum; toner adheresHigh quality, high speed
Non-impactThermalHeat-sensitive paperReceipts, low cost
   Impact printers    : noisy, slow, cheap consumables, multi-part forms
   Non-impact printers: quiet, fast, better quality, costlier consumables

5. Data Rates — the reason for interface design

DeviceTypical data rate
Keyboard10 bytes/s
Mouse100 bytes/s
Modem (56 K)7 KB/s
Printer (laser)100 KB/s
Hard disk100–200 MB/s
SSD (NVMe)3–7 GB/s
Gigabit Ethernet125 MB/s
Main memory10–50 GB/s
CPU register file100+ GB/s
   The spread between a keyboard and main memory is about 10^9.
   No single transfer technique can serve both efficiently — which is
   exactly why Unit IV defines THREE modes of transfer:
   programmed I/O, interrupt-driven I/O and DMA.

6. ASCII — the character code peripherals speak

   ASCII = 7-bit code -> 128 characters (an 8th bit is often a parity bit)

   0x00 - 0x1F : control characters (NUL, BEL, BS, HT, LF, CR, ESC, ...)
   0x20        : space
   0x30 - 0x39 : digits '0' to '9'
   0x41 - 0x5A : 'A' to 'Z'
   0x61 - 0x7A : 'a' to 'z'
   0x7F        : DEL

   Useful facts:
      'A' = 65 = 0x41,  'a' = 97 = 0x61   ->  difference is exactly 32 (bit 5)
      '0' = 48 = 0x30   ->  digit value = ASCII code - 48
Related codeBitsNote
BCD6Older, 64 characters
EBCDIC8IBM mainframes, 256 characters
ASCII7 (+1 parity)The de facto standard
Unicode / UTF-88–32Covers all world scripts; ASCII is a subset

7. Where Peripherals Attach

Every device hangs off an interface unit that resolves the four mismatches listed in section 1. The structure of that interface unit is the subject of the next lesson.

Summary

   Peripherals = input, output, storage and communication devices
   Four mismatches: speed, data format, signal level, operating mode
   -> every device needs an INTERFACE
   Data rates span 10^9 -> three different transfer modes are needed
   ASCII = 7-bit character code used by most character devices