Understanding A Computer - Part 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Understanding a Computer – Part 2

1
Agenda

• How computers represent data?


• How computers process data?

2
How do computers
represent data

3
Number System

• Number systems
– A manner of counting
– Several different number systems exist
• Decimal number system
– Used by humans to count
– Uses 10 symbols (0-9)
– Digits combine to make larger numbers
• Binary numbering system
– Uses only two symbols (1 and 0) to represent all
possible numbers 4
Data and Program Representation

• Digital computers: Can only understand two states, off


and on (0 and 1)
• In order to be understood by a computer, data and
programs need to be represented appropriately
• Coding systems: Used to represent data and programs
in a manner understood by the computer
• Digital data representation:
The process of representing
data in digital form so it can be
understood by a computer

1
How Computers Represent Data

• A computer uses the Binary Number System

• Binary Number System


– Two distinct digits, 0 and 1
– 0 and 1 combine to make numbers

• Why do computers use the Binary Number System?


– A computer has switches to represent data and switches
have only two states: ON and OFF.
– The Binary Number System has two digits to do the
counting: 0 and 1; a natural fit to the two states of a switch
(0 = OFF, 1 = ON).
5
How Computers Represent Data

• Our brain contains around 100 billion cells called


neurons—the tiny switches that let you think and
remember things

• Computers contain billions of miniature "brain


cells" as well, called transistors

6
How the CPU Works

• CPU: Consists of a variety of circuitry and components


packaged together
– Transistor: Key element of the microprocessor
• Made of semi-conductor material that acts like a
switch controlling the flow of electrons inside a chip
• Today’s CPUs contain hundreds of millions of
transistors; the number doubles about every 18 months
(Moore’s Law)

16
Transistors

• Invented at Bell Laboratories in 1947 by three brilliant US


physicists: John Bardeen, Walter Brattain, and William
Shockley
• Basic building block of any modern electronic circuit
• A transistor can work either as an amplifier or a switch
• Billions of transistors are interconnected and embedded
into tiny chips to create computer memories,
microprocessors, and other complex ICs
http://www.explainthatstuff.com/howtransistorswork.html 7
And before transistors…?

The vacuum tube and ENIAC-The first digital computer


the transistor. Photo: U.S Army
• Vacuum tubes Photo: Nobelprize.org

• Just as the transistor, the vacuum tube can switch


electricity on or off, or amplify a current
• It generates a lot of heat and has a tendency to burn out
• Also, compared to the transistor it is slow, big and bulky
https://www.nobelprize.org/educational/physics/integrated_circuit/history/
8
Data Representation

A computer circuit (transistor) represents the 0 or the 1


electronically by the presence or absence of an electrical
charge

9
Data Representation
• Bits and bytes
– Binary numbers are made of
bits
– Bit represents a switch
– A byte is 8 bits
– A byte represents a single
character in the computer

10
Digital Data Representation
• Bit: The smallest unit of data that
a binary computer can recognize
(a single 1 or 0)
• Byte = 8 bits
• Byte terminology used to
express the size of documents
and other files, programs, etc.
• Prefixes are often used to
express larger quantities of
bytes: kilobyte (KB), megabyte
(MB), gigabyte (GB), terabyte
(TB), etc.

2
Data Representation

• Text codes
– Converts letters into binary
– Standard codes necessary for data transfer
– ASCII (7 bit)
• American English symbols
– Extended ASCII (8 bits)
• Graphics and other symbols
– Unicode (UTF-8, UTF-16, UTF-32)
• All languages on the planet

11
Data Representation

12
Data Representation

• Part of the ASCII-8


(American Standard
Code for Information
Interchange)

12

You might also like