0% found this document useful (0 votes)
117 views

CS50T - Lecture1 Hardware - Rasha Abdeen

This document provides an overview of computer hardware and software concepts. It discusses the binary system, CPU components like the ALU and control unit, memory types, input/output devices, and computational thinking concepts. It also defines computer science as the study of algorithms, performance, and systems including hardware and software.

Uploaded by

Xxx X
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
117 views

CS50T - Lecture1 Hardware - Rasha Abdeen

This document provides an overview of computer hardware and software concepts. It discusses the binary system, CPU components like the ALU and control unit, memory types, input/output devices, and computational thinking concepts. It also defines computer science as the study of algorithms, performance, and systems including hardware and software.

Uploaded by

Xxx X
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 69

CS50T

By Eng. Rasha Abdeen

Youtube: Coders Camp


https://youtube.com/playlist?list=PLnrlZUDQo
fUvLtIMvVxZRYYju7ni0Xsxq
Lecture 1 : Hardware
• Binary System
• CPU
• RAM ( Random Access Memory)
• Hard Drives
• Flash memory
• Types of Memory and Funneling
• Display Connectors
• USB (Universal Serial Bus)
• Wireless ( WIFI – Bluetooth)
• Operating System (OS)
What is Computer Science ?

• A Computer System is divided into two


categories: Hardware and Software.

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 ?

• Knowing how to program is only one element of the field.

• 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.

• Computer scientists are problem solvers.


What is Computer Science ?

• Computer science is fundamentally problem solving.

• 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 ?

Four Main Problem Solving Steps:

1. Understand the Problem.


2. Design a Solution.
3. Implement your Solution.
4. Check your Solution.
What is Computer Science ?

Computational thinking:

• Computational thinking is thinking algorithmically, taking inputs to a problem and


carefully going step by step to produce an output.

• 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

Find things that similar.


Abstraction

• Focus in what is important and ignore what is not.


• Abstraction is a technique where we can think about a problem more usefully at a
higher level as opposed to the lowest level that it is implemented in.
Algorithms

• Write step by step instructions to solve the problem.


Flowchart
Pseudocode

Step 1: Add up the items by type or flavor.


Step 2: Assign the price per each item type.
Step 3: Multiply the number of items by type with its
cost per unit.
Step 4: Add the total cost for each type together.
Step 5: Bon Appetit!
‫‪Binary System‬‬
‫النظام الثنائي‬
Binary System Decimal System
Computer No. System Human No. System

Base 2 system ( 0 , 1) Base 10 system ( 0,1,2,3,4,5,6,7,8,9 )

Power of 2 Power of 10

… 𝟐𝟐 𝟐𝟏 𝟐𝟎 … 𝟏𝟎𝟐 𝟏𝟎𝟏 𝟏𝟎𝟎

… … 100 10 1
4 2 1

0 1 1 1 2 5 5

7= 1*4 1*2 1*1 255 = 2*100 5*10 5*1

11111111 in binary system = 255 in decimal system


Binary System:

Example:

How 11111111 in binary system = 255 in decimal system

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

• 1 TB (Terabyte) = 1,024 GBs (Gigabytes)


• 1 GB (Gigabyte) = 1,024 MBs (Megabytes)
• 1 MB (Megabyte) = 1,024 KBs (kilobytes)
• 1 KB (Kilobyte)= 1,024 Byte (Byte)
• 1 B (Byte) = 8 b (bits)
Representing Letters

ASCII ( American Standard Code for Information Interchange):


• Original ASCII is 7 bits, thus giving 128 characters.

####### ######## ####


0000000 0000
1111111 1234
28 = 256 1024
0111111
1110000 3240
1010101 2568

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 ( American Standard Code for


Information Interchange):
• Original ASCII is 7 bits, thus giving 128
characters.
• Extended ASCII is 8 bits, yielding 256
characters

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!

UTF-8 Requires 8, 16, 24 or 32 bits (one to four bytes).


Utf-16 Requires either 16 or 32 bits to encode a character.
UTF-32 Always requires 32 bits to encode a character.

• All are still represented by a pattern of bits.


Hardware

Main categories:

1. Processing devices
2. Storage devices
3. Input devices
4. Output devices
Hardware

Motherboard:

• Is the backbone that ties the


computer's components together and
allows them to talk to each other.

• Without it, none of the computer


pieces could interact.

• In 1981, the first motherboard was


used in the IBM computer that was
originally known as planar.
Hardware

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

The term “Computer" is derived from the Latin word


“Computare" which means to calculate.
ENIAC Electronic Numerical Integrator and Computer
Moore's law

Gordon Earle Moore


Central Processing Unit

Hardware
Control Unit Registers

CPU ( Central Processing Unit ) (Processor) Arithmetic & Cashe


Logic Unit Memory

ALU ( Arithmetic & Logic Unit ):

• Arithmetic functions include addition, subtraction, multiplication ,and division.


• Logical functions mainly include selecting, comparing, and merging the data.
• ALUs can be used for maintaining timers that help run the computer.
Central Processing Unit

Hardware
Control Unit Registers

CPU ( Central Processing Unit ) (Processor) Arithmetic & Cashe


Logic Unit Memory

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

CPU ( Central Processing Unit ) (Processor) Arithmetic & Cashe


Logic Unit Memory

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

CPU ( Central Processing Unit ) (Processor) Arithmetic & Cashe


Logic Unit Memory

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.

• L1 (Level one Cash memory). Byte = 8 b (bits)


• L2 (Level 2 Cash Memory). Kilobyte = 1,024 Byte (Byte)
Megabyte = 1,024 KBs (kilobytes)
• L3 (Level 3 Cash Memory). Gigabyte = 1,024 MBs (Megabytes)
Terabyte = 1,024 GBs (Gigabytes)
Hardware

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

CPU ( Central Processing Unit )


Cores:
Hardware CPU ( Central Processing Unit )

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

• Volatile Memory only stores data when the power is on


• The chips store data
• Files and programs are loaded onto these chips when ran
• Fast memory
Hardware RAM ( Random Access Memory )

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

Registers Byte = 8 b (bits)


Kilobyte = 1,024 Byte (Byte)
Cashe memory Megabyte = 1,024 KBs (kilobytes)
RAM Gigabyte = 1,024 MBs (Megabytes)
Terabyte = 1,024 GBs (Gigabytes)
Hardware
Hard Drives (HDD):

• 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.

Solid State Disk ( SSD ):

• This non-volatile storage media stores


data on solid-state flash memory.
• Smaller (3.5 inch width for HDD vs 2.5 inch
Width for SSD) Still fits where old HDDs are
• Inside, it looks a lot like RAM.
No moving particles
Hardware
Flash Memory:

Flash memory is an electronic non-volatile computer memory storage medium that can
be electrically erased and reprogrammed.

Solid State Disk ( SSD ):

• Much faster than HDD


• SSD theoretically don’t last as long as HDD
• Finite number of writes
• Smaller and faster than (HDDs).
• Noiseless and allow PCs to be thinner
and more lightweight.
Hardware
Flash Memory:

Also exists in the form of USB sticks


Might store 1 GB, 16 GB, or more
Portable
Hardware
External SSDs, and HDD

• Exist for more storage Might store 256 GB or more.


• Can be used to share data with others without network usage.
Hardware
Hardware
Solid State Hybrid Drives ( SSHD):

Some GB of solid state memory and more GB or TB of HDD space.


Stores as much of frequently-needed data on the SSD.
Stores less frequently-needed data on HDD.
Hardware
Hardware
Types of Memory and Funneling:

Data is pushed “down the funnel” to your CPU


From the hard drive, data first goes to the RAM
Hardware
Types of Memory and Funneling:

• Theoretically, the CPU never has to


wait for data to crunch.

• Memory at the bottom is more


expensive.

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

Input, Output Devices:


Hardware

Input, Output Devices:


Hardware

Input, Output Devices:


• Display Connectors:
• These sockets all connect to monitors or displays
• Mini DisplayPort are used form monitors
• HDMI is not only on laptops and computers but also TVs
• VGA is older, but still commonly uses on projectors
Hardware
Input, Output Devices:
• USB ( Universal Serial Bus ):
• USB-A most common
• USB-B is often used for printers and
scanners
• USB-C is newer and can be plugged in
coming from different directions
• Older USB connections are slower when
transferring data
• Hard drives can connect via USB
• Even if a hard drive is fast, if the USB is
slow, the transfer of data will be slow
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

System on a Chip (SoC)

A SoC is a complete system on a chip. A `system' includes a microprocessor, memory


and peripherals, When a CPU and more are all interconnected at once rather than
attached to a motherboard.
• SoCs are found in every consumer product, from modems,
mobile phones, DVD players, and televisions.

• The advantage of an SoC is that it is cheaper,


smaller, and more energy efficient.
• The disadvantage is that, unlike a full-size computer,
they are locked into their configuration.
Hardware

Systems on a Chip (SoaC)

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

Operating System (OS):

• Desktop

• Mobile
Hardware

Operating System (OS):


• Installed on HDD or SSD so that it exists persistently without power
• When you hit power on your computer, the OS is loaded into RAM
• Knows how to:
• Talk to your keyboard and mouse
• Display info on the screen
• Move things around in memory
• When an OS doesn’t recognize a device, perhaps because it’s too new, you can
download new device driver from the device manufacturer.
• Teaches Window, MacOS, or Linux about that new hardware.
• Future-proofing structure.
THANK YOU
Rasha Abdeen

You might also like