Introduction to Computers
Introduction to Computers
Hard-Wired Stored-program
Hard-wired v/s Stored Program Computers
• Earlier computers : • Stored-program computer:
• Instructions determined by the • Stores instructions in its memory
wiring of the machine or by holes • Introduced in the late 1940s
on punched tape by John von Neumann
Classification of Computers
Computers
2 14 0
2 7 1
2 3 1
2 1 1
2 0 1
Decimal conversion
0.875 × 2 = 1.750 ⇒ 1
0.75 × 2 = 1.50 ⇒ 1
0.50 × 2 = 1.00 ⇒ 1
• 17.375
2 17 1
• 0.375 × 2 = 0.750 ⇒ 0 8 0
• 0.75 × 2 = 1.5 ⇒ 1 4 0
2 0
• 0.5 × 2 = 1.0 ⇒ 1 1 1
0
Hexadecimal Numbers
• 0010 0111 1010.1010 0100
2 7 A . A 4
10 4
• 512 + 112 + 10 + + =
16 256
• 10 1101 0010 1010 . 1100 1
• 0010 1101 0010 1010 . 1100 1000
2 D 2 A . C 8
Exercise
• Convert to binary:
• 22.625
• 6.02
• -10.125
• 15.8
• Convert to decimal, octal and hex:
• 1011.1101
• 1110111.00111
Computer Languages
• Means of communicating with the computer
• Machine Language – 0/1
• Low Level Languages:
• Assembly Language
• High Level Languages:
• BASIC
• COBOL
• Fortran
• C
• C++
• Java
• Python
Compilers, Assemblers and Interpreters
Compiler v/s Interpreter
• Scans the whole program • Translates one statement at a
time
• Execution time is less • Slow in executing
• Converts source code to • Does not convert source code to
object code object code rather scans it line
• Does not require source code by line
for later execution • Requires source code for later
• Often take large amount of execution
time for analyzing the source • Takes less time in analyzing
code source code
• More efficient • Less efficient
• C, C++, C# are compiled • Python, Ruby, Perl, MATLAB, R
languages etc. are all interpreted languages
Storage Types
Internal Memory or
Primary Storage
External Memory or
Secondary Storage
Memory Hierarchy
Cache Memory
(SRAM)
Magnetic Tape
The Processor
• Definition: a chip or logical circuit that responses to and process the
basic instructions to drive a particular program
• Manufacturers: Intel, AMD, Qualcomm, IBM, Motorola, Samsung etc.
• Material: Silicon chip
• Speed Measurement: Mega-Hertz or Giga Hertz
• Functions: Fetch, decode, execute, write back instructions
References
• https://www.javatpoint.com/operating-system
• https://www.javatpoint.com/types-of-operating-systems