CS50T - Lecture1 Hardware - Rasha Abdeen
CS50T - Lecture1 Hardware - Rasha Abdeen
Hardware:
• The physical components of the computer.
Software:
• Software is a set of instructions that tells a
computer exactly what to do.
Hardware Software
It is manufactured. It is developed and engineered.
Electronic and other materials are used to Created by utilizing a computer language to
create hardware. write instructions.
The software does not wear out with time.
Hardware typically wears out over time.
However, it may contain flaws and glitches.
Main categories: Mainly divided into :
• Input devices • System software
• Output devices • Programming software
• Storage devices • Application software
• Processing devices
What is Computer Science ?
• Computer science is the study of the theory, design, implementation of any algorithm, and
performance of computer software and computer systems, including the study of computing
itself.
• A computer scientist’s goal is to develop list of instructions for solving any problem that
might arise.
Problem
Input Output
Solver
What is Computer Science ?
Computational thinking:
• We can then present these solutions in a way that a computer, a human, or both,
can understand.
Computational thinking
① Decomposing Abstraction ③
Pattern
② Recognition
Algorithms ④
Decomposing
The breaking down of a system into smaller parts that are easier to understand,
program and maintain.
Pattern Recognition
Power of 2 Power of 10
… … 100 10 1
4 2 1
0 1 1 1 2 5 5
Example:
1 1 1 1 1 1 1 1
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255
Binary System:
Example:
11111111 = 255
bit Byte digit
7
2 = 128 104 = 10000
Representing Letters ASCII : Original ASCII is 7 bits, thus giving 128 characters.
Representing Letters
01001000 01001001
72 73
H I
• Programs like notepad, textedit, and MicroSoft Word decide weather to display patterns
of bits as letters or words
• Computers only store 0s and 1s, but the programs interpret those bits in a certain
way
Representing Letters
ASCII is Limited!!
Representing Letters
UNICODE:
• Is a modern standard for text representation that defines each of the letters and
symbols commonly used in today's digital and print media.
• Is a bigger set of characters that includes written languages other than English and
even emoji!
Main categories:
1. Processing devices
2. Storage devices
3. Input devices
4. Output devices
Hardware
Motherboard:
1. Processing Devices:
Are the components responsible for the processing of information within the computer
system. This includes devices such as:
• CPU
• GPU
• Video Card
• Sound Card
Hardware
1. Processing Devices:
The CPU is the brain of the computer:
• Does all the thinking
Hardware
Control Unit Registers
Hardware
Control Unit Registers
Control Unit:
• It interacts with both the main memory and arithmetic logic unit.
• it issues control signals that control hardware
• it moves data around the system
• it fetches, decodes and executes instructions.
Hardware
Fetch-Decode-Execute Cycle
How the CPU can perform calculations, using a process known as the fetch-decode-
execute cycle.
Central Processing Unit
Hardware
Control Unit Registers
Registers:
Are small amounts of high-speed memory contained within the CPU. They are used by the
processor to store small amounts of data that are needed during processing, such as:
• the address of the next instruction to be executed. • 1 TB (Terabyte) = 1,024 GBs (Gigabytes)
• the current instruction being decoded. • 1 GB (Gigabyte) = 1,024 MBs (Megabytes)
• the results of calculations. • 1 MB (Megabyte) = 1,024 KBs (kilobytes)
• 1 KB (Kilobyte)= 1,024 Byte (Byte)
• 1 B (Byte) = 8 b (bits)
Central Processing Unit
Hardware
Control Unit Registers
Registers:
Commonly used types of registers
• AC (Accumulator)
• AR (Address Register)
• DR (Data Register)
• IR (Index Registers)
• PC (Program Counter)
• MDR ( Memory Data Register)
• MBR ( Memory Buffer Register) and more.
Central Processing Unit
Hardware
Control Unit Registers
L1 KB
CPU ( Central Processing Unit ) (Processor) Arithmetic &
Logic Unit L2 KB, MB
L3 MB
Cashe Memory:
Is a special very high-speed memory. It is used to speed up and synchronizing with high-
speed CPU.
1. Processing Devices:
The CPU is the brain of the computer:
• Does all the thinking
• Performs math in numbers fed to it
• Helps display numbers on a screen
• Adds or deletes numbers
• Cores and Multithreading
Hardware
Cores:
• 1 core: Don’t expect to be able to open more than one program at a time.
• 2 cores(Dual-core)
• 4 cores(Quad-core)
• 6 cores(hexa-core)
• 8 cores(Octa-core)
Hardware CPU ( Central Processing Unit )
Cores:
• 1 core
• 2 cores(Dual-core):
• You can access email, create and edit documents and spreadsheets
• Don’t expect to render or edit video without crashing your system
• you can probably play many games on lower settings, but if you are serious about your gaming, you will
want to consider upgrading to a quad-core processor.
• 4 cores(Quad-core)
• 6 cores(hexa-core)
• 8 cores(Octa-core)
Hardware CPU ( Central Processing Unit )
Cores:
• 1 core
• 2 cores(Dual-core)
• 4 cores(Quad-core):
• Allow you to render video (slowly) or play games (at lower resolutions) in addition to all your regular
work or school tasks.
• Most gamers will be fine here as long as you are not playing the most processor-intensive games and
you have a dedicated GPU.
• 6 cores(hexa-core)
• 8 cores(Octa-core)
Hardware CPU ( Central Processing Unit )
Cores:
• 1 core
• 2 cores(Dual-core)
• 4 cores(Quad-core):
• if you work in video editing, graphic design and 3D rendering, sound editing, or a similar profession,
you would be better served by more cores.
• These industries require applications that use more processing power, along with features like a
dedicated GPU, increased storage space, and at least 16GB of RAM.
• 6 cores(hexa-core)
• 8 cores(Octa-core)
Hardware CPU ( Central Processing Unit )
Cores:
• 1 core
• 2 cores(Dual-core)
• 4 cores(Quad-core)
• 6 cores(hexa-core):
• You can use hexa-core processors for all complex software such as video and audio editing.
• For more advanced games and programs.
• 8 cores(Octa-core)
Hardware CPU ( Central Processing Unit )
Cores:
• 1 core
• 2 cores(Dual-core)
• 4 cores(Quad-core)
• 6 cores(hexa-core)
• 8 cores(Octa-core):
• if you’re a pro gamer , a video editor, or an engineer.
• Video gamers who play, record, and stream intensive games should opt for more cores for as much
power as possible.
• And if you routinely use power-intensive software like VR or AutoCAD, this is your sweet spot.
Hardware CPU ( Central Processing Unit )
Cores Hyper-Threading
Hardware RAM ( Random Access Memory )
Hardware RAM ( Random Access Memory )
RAM: Circuit board with chips that slides into a slot on the motherboard
RAM: Circuit board with chips that slides into a slot on the motherboard
Capacity: 4 GB
16 GB
32 GB
1 GB = 8,589,934,592 bits
• When you turn a computer off, you need a place to store data
• A hard disk drive (HDD) stores this information ( Nonvolatile )
Hardware
Hard Drives (HDD):
• Inside a HDD, metal platters physically spin around
• Data is stored on these disks
• The reading heads move back and forth reading data from the device
• Power is only needed to read or change the data
• Data is preserved when power is off
Hardware
Hard Drives (HDD):
• RAM may store 1 GB, 2 GB, 4 GB, through 16 GB or so
• HDD stores 256 GB, 1024 GB (AKA terabyte or TB), 2 TB
Hardware
Hard Drives Disadvantages :
• Anytime you have a physical device that moves over a period of time, things go wrong
• Dropping a HDD can corrupt files
• A hard drive might spin 7200 or 10000 times per minute but still Platters spin slower
than how fast electrons move.
Hardware
Main Categories:
1. Processing devices
2. Storage devices
• Primary Storage device:
• RAM
• Secondary Storage Devices:
• Hard Drive Disk ( HDD )
3. Input devices
4. Output devices
Hardware
Flash Memory:
Flash memory is an electronic non-volatile computer memory storage medium that can
be electrically erased and reprogrammed.
Flash memory is an electronic non-volatile computer memory storage medium that can
be electrically erased and reprogrammed.
Byte = 8 b (bits)
Kilobyte = 1,024 Byte (Byte)
Megabyte = 1,024 KBs (kilobytes)
Gigabyte = 1,024 MBs (Megabytes)
Terabyte = 1,024 GBs (Gigabytes)
Hardware
Wireless:
• WiFi and Bluetooth are wireless technologies that are widely used
to send and receive data wirelessly using radio signals.
• Wifi is wireless internet and for high-speed Internet access that
connects nearby devices with each other and share the Internet
via hotspots.
• Bluetooth allows devices such as wireless keyboards and
headphones to connect to your computer
• Limited range
• This is ok as it is used for you to connect to your own
device.
Hardware
When a CPU and more are all interconnected at once rather than attached to a
motherboard
• Popular in phones, tables, and game consoles
• Raspberry Pi
Hardware
• Desktop
• Mobile
Hardware