Sei sulla pagina 1di 11

Lecture 03: Introduction

CS 101: Introduction to Computing

Data Representation

Zawar Hussain

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi

Lecture 03: Introduction

CS 101: Introduction to Computing

Representing
Non-Numeric Data

Some decimal values & their binary equivalents

In addition to numeric data, computers also


manipulate character data
numbers, symbols, numerals that are not used
in arithmetic operations
To represent them, codes have been developed
that specify binary equivalent for each character
ASCII 7 bits [Example table given ]
Unicode 16 bits

Char

Decimal

Binary

Sounds and pictures must be transformed


into a format the computer can understand

65

100 0001

66

100 0010

A computer must digitize colors, notes, and


instrument sounds into 1s and 0s

48

011 0000

49

011 0001

36

010 0100

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi

Lecture 03: Introduction

CS 101: Introduction to Computing

Quantifying Bits and Bytes


A bit is one binary digit (b):
can have value either 0 or 1

A byte is 8 bits (B)


0010 0100

Kilo- means a 1000; Mega- means million; Giga -means billion

Kilobit (Kb) is 1,024 bits


Kilobyte (KB) is 1,024 bytes
Megabyte (MB) is 1,048,576 bytes
Gigabyte (GB) is 1,073,741,824 bytes

Bits take the form of electrical pulses that can travel over circuits
Almost the same way as electricity flows over a wire when you turn on a
light switch

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi

Lecture 03: Introduction

CS 101: Introduction to Computing

Computer Languages - 1

Three types of programming languages


1. Machine languages

Strings of numbers giving machine specific instructions


Example:
+1300042774
+1400593419
+1200274027

2. Assembly languages

English-like abbreviations representing elementary


computer operations (translated via assemblers)
Example:
LOAD BASEPAY
ADD OVERPAY
STORE GROSSPAY
Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi

Lecture 03: Introduction

CS 101: Introduction to Computing

Computer Languages - 2
1. High-level languages

Similar to everyday English, use mathematical notations


(translated via compilers)
Example:
grossPay = basePay + overTimePay

C/C++ is a High-level language.

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi

Lecture 03: Introduction

CS 101: Introduction to Computing

Types of Computing
Personal computers
The idea of personal computing first introduced by Apple computer in 1977
First PC introduced by IBM in 1981
Economical enough for individual

Distributed computing
Computing distributed over networks
Often used LANs
PCs were powerful enough to
handle the computing requirements of individual users
handle the basic communication tasks/information passing between the PCs
electronically

Client/server computing
Sharing of information across computer networks between file servers and
clients (personal computers)
Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi

Lecture 03: Introduction

CS 101: Introduction to Computing

Types of Computing
Parallel Computing
Used to solve large and complex problems
Goal?
Divide problem into sub-problems
Use multiple processors to solve each of the
individual problem
Combine the results of the individual sub-problem
to generate the solution of the original complex
problem

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi

Lecture 03: Introduction

CS 101: Introduction to Computing

Computer Hardware

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi

Lecture 03: Introduction

CS 101: Introduction to Computing

Computer Chips (-1-)


Most electronic components inside a computer are
integrated circuits
Thin slices of silicon crystal packed with microscopic circuit
elements

Semiconducting materials are


used to fabricate a chip
Types of chips:
DIPs; DIMMs; PGAs;
SEC cartridge

*The motherboard houses all essential chips and


provides connecting circuitry between them
Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi

Lecture 03: Introduction

CS 101: Introduction to Computing

Computer Chips (-2-)

Dual
In-line
Package
(DIP)

Dual
In-line
Memory
Module
(DIMM)

Pin
Grid
Array
(PGA)

Single
Edge
Contact
(SEC)

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi

Lecture 03: Introduction

CS 101: Introduction to Computing

Microprocessor
An integrated circuit designed to process instructions CPU on a chip
The CPU has two parts
ALU (arithmetic logic unit)

Performs arithmetic operations


Performs logical operations
Uses registers to hold data being
processed
Control Unit

Directs and coordinates processing

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi

Potrebbero piacerti anche