During The Lecture Sessions:: No Mobile Phones, Pdas, Tablets
During The Lecture Sessions:: No Mobile Phones, Pdas, Tablets
During The Lecture Sessions:: No Mobile Phones, Pdas, Tablets
No Quiz/CT Preparation
References:
Softwares:
Kilobyte KB 10 1,024
2
Megabyte MB 20 1,048,576
2
Gigabyte GB 30 1,073,741,824
2
Terabyte TB 40 1,099,511,627,776
2
Primary Memory
RAM Modules
Mainboard / Motherboard
Mainboard / Motherboard
cpu
RAM
Execution
Cycle
Execute
Store 3
4
Arithmetic/Logic Unit
Computing Environments
Personal computing
Hardware Abstraction
Layer (HAL)
Types of software
Software
Application Programs Systems Programs
Word processors Operating system.
Game programs Networking system.
Spreadsheets Programming
Data base systems language software.
Graphics programs Web site server.
Web browsers Data backup.
Operating Systems
The most important systems program is the operating
system.
It is a group of programs that coordinates the
operation of all the hardware and software
components of the computer system.
It is responsible for starting application programs
running and finding the resources that they need.
Note:
Executing programs
I/O (Input/Output)Devices
Input devices are used to enter programs and
data into a computer.
Examples: keyboard, mouse, microphone, scanner,
webcam, digital pen, bar code reader, etc.
Output devices are where program output is
shown or is sent.
Examples: monitor, printer, and speaker.
An I/O device is directly connected to the
System, but through a device controller.
Input devices
Keyboard
Mouse
Smart card
Requires special card reading terminal.
These card contain microchips that can keep permanent records and updated
each time it is inserted in the card reader.
A mouse is a hand-movable device that controls the position of cursor on the screen.
Generally of two types
1. Mechanical mouse
Consists of a box with buttons on the top and a ball on the bottom.
The mouse is placed on a flat surface.
Balls movement on the surface causes the cursor movement on screen.
Fig : A mouse
2. Optical mouse
Non-mechanical.
This type of mouse emits a beam of light whose reflection is used as a
signal.
2. Track ball
A track ball is a pointing device that works like an upside mouse.
In order to move the pointer the ball is rolled.
These devices may also used to move the cursor around the screen to
facilitate input to a graphical display .
5. Touch screen
Scanning devices
This category includes
1. Scanners
2. Bar code reader
3. Digital camera
1. Scanner
It converts any printed image in to electronic form by shining light on to the
image and then measuring the intensity of light at every point.
Text image can also be edited with the help of Optical character recognition
software.
Three basic types are
1. Sheet-fed scanner ( Mechanical rollers move the paper past the scanner
head)
2. Flatbed scanner (The paper is stationary over a glass window and the
head move past the scan head)
3. Hand-held scanner. (Human head is required to move the scan head)
2. Bar code reader
A device for scanning or reading a bar code.
Bar code is printed code that consists of parallel different bars of different
width and spacing.
Usually common in the coding of food and other goods. Also found in
library system and security systems.
3. Digital camera
It uses light sensitive electronic technique instead of film to capture
images.
This images taken in the digital camera is stored in its own memory and
can be transferred to any hard or floppy drive or to a PC card via USB port.
Image quality can be improved by using different image editing software's
like Painter, Adobe Photoshop etc.
Other input devices
Audio input device (Microphone)
A voice input device.
Converts spoken words in to electrical signals by comparing the electrical
patterns produced by a speakers voice with a set of prerecorded patterns.
Output devices
CRT monitor
Looks like a television.
The main component is a large vacuum tube
called cathode ray tube (CRT)
Fig: How image is produced in
CRT monitor.
Fig: Scanning pattern of CRT
monitor
The smallest numbers of dots that a a electron gun can focus is called pixel in other
words the minimum unit of screen.
In case of a monochromatic monitor there is one electron gun.
In case of a color monitor there are three electron guns for three basic colors
Two main drawbacks of CRT monitors are
1. Bulky
2. Requires lot of power
Flat panel monitors
A flat panel monitor occupy less space than CRT monitor.
It runs cooler than CRT motor.
There are several types of flat panel monitor. The most
common is the LCD (Liquid crystal display) monitor.
2. Resolution
The term resolution refers to the sharpness of images.
The monitors resolution is determined by the number of pixels on the screen.
The more pixels a monitor can display the higher the resolution and thus the
clearer images.
A resolution of 640x480 means, 640 pixels in horizontally and 480 pixels
vertically down the screen.
3. Refresh rate
The monitors refresh rate is the number of times per second that the electron
gun scan every pixel on the screen.
It is important because phosphor dots fade quickly after the electron gun
charges them with electrons.
Refresh rate is measured in Hz
Refresh rate over 72 Hz is favorable.
4. Dot pitch
Important parameter for color monitor.
Briefly, the dot pitch is the measure of how much space there is between a
display's pixels.
When considering dot pitch, remember that smaller is better.
Usually it is measured as a fraction of mm.
Should be 0.22 mm or even less is better.
5. Color depth
color bit depth refers to the number of bits used to describe the color of a
single pixel. The bit depth determines the number of colors that can be
displayed at one time.
Fig : Dot pitch of color monitor
1 2
(monochrome)
2 4
(CGA)
4 16
(EGA)
8 256
(VGA)
24 16,777,216
(True Color, SVGA)
32 16,777,216
(True Color + Alpha Channel)
Working Principle of CRT
Logic Board
(Controller Circuit)
VCD/DVD
CD DRIVE
Zip and Jaz drives
1/2 GB
100/250 MB
USB Flash Disk (Pen drive)
Mini / Micro Storage Devices
Peripheral Devices
Require Hardware I/O ports, such as PCI, COM,
LPT, USB, etc, to physically connect with the CPU.
Require Software drivers to communicate and/or
interact with the Operating System.
Peripheral Devices
File systems
Method the OS uses to store information
Storage unit, directories, subdirectories (Windows, VMS)
Single arborescence (Linux, MacOSX, all Unix)
What exactly is a file?
a piece of information (text, graphic, data, music
program, script)
it is identified by a name and an logical address (or path)
other informations: date, size, type, creator, ownership,
physical address
File system organisation
bin lib
emacs X11
Windows Unix
Path
The path is the logical address used by the
system or the user to locate a file.
Example:
/bd_du_Palais/35/etage/4/appart/12/Dupont_ Jean.txt
suffix
filename
path
File types
Executable Special cases in Unix
.exe STDIN
.app STDOUT
Unix requires x STDERR
Data
Text (.txt)
Music (.mp3)
Image (.jpg, .gif)
Movie (.mpg, .mov)
Binary (.bin)
Encryption / compression
Compression
Reducing the size of files
E.g., .mp3, .gz, .jpg, .zip
Encryption
Protecting your privacy
E.g., .pgp
Packing
Grouping the files
E.g., .tar
Languages
Low level (processor dependent)
Machine code, assembler
High level: structured, procedural
Fortran, C, Pascal
High level: object oriented
C++, Java, C#, Perl, Objective-C
Virtual machines
Java, C#
Scripting
Perl, Python, JavaScript
Programming Languages
Machine language
Hardware-dependent, cumbersome manipulation of
series of numbers (1s and 0s)
Assembly language, e.g.
LOAD BALANCE
ADD TAX
STORE TOTAL
Class
tool for encapsulating data and operations (methods)
into one package
defines a template or model for creating and
manipulating objects
Objects
data created using the class and its methods
an object is an instance of the class
creating an object is instantiation
OOP Advantage: Reuse
Well-written classes can be reused in new
applications
Shortens development time because
programmers don't need to write new code
Programs are more robust because the class
code is already tested
Algorithms
An algorithm is an exact specification of how to solve a computational
problem
An algorithm must specify every step completely, so a computer can
implement it without any further understanding
An algorithm must work for all possible inputs of the problem.
Algorithms must be:
Correct: For each input produce an appropriate output
Efficient: run as quickly as possible, and use as little memory as possible
more about this later
There can be many different algorithms for each computational
problem.
The running time of your program will depend upon:
The algorithm
The input
Your implementation of the algorithm in a programming language
The compiler you use
The OS on your computer
Your computer hardware
Describing Algorithms
Algorithms can be implemented in any programming language
Usually we use pseudo-code to describe algorithms
For j = 2 .. N-1
If j|N
Output N is composite and halt
Output N is prime
How Does a Computer think?
Transistors form switches that are in on or
off states.
The Pentium 4 chip has over 42 million,
Core 2 Duo has over 291 million and 6-core
Core-i7 has over 1.2 billion transistors.
Each transistor creates one bit.
8 bits create one byte
Why are Bytes Important?
ASCII (American Standard Code for
Information Interchange) tables
Unicode addresses the ASCII limitations
http://www.asciitable.com/
ASCII & Unicode
All data in memory is numeric. Characters are stored
by using a character code that maps numbers to
characters. One of the most common character codes
is known as ASCII.
A new, more complete code that is supplanting ASCII
is Unicode.
e.g. ASCII maps the byte 4116 (6510) to the character
capital A; Unicode maps the word 004116.
This is important for representing characters for all the
languages of the world.