Computer and programming 1
(part 1) CED 071
الحاسوب والبرمجة
Lecture 1
Dr. Ahmed Fouad
Course content
INTRODUCTION TO THE WORLD OF COMPUTERS مقدمة لعالم أجهزة الحاسوب
MEMORY AND STORAGE الذاكرة والتخزين
COMPUTER SOFTWARE AND NETWORKS برامج الحاسوب والشبكات
DIGITAL DATA REPRESENTATION تمثيل البيانات الرقمية
INTRODUCTION TO LOGIC GATES مقدمة للبوابات المنطقية
INTRODUCTION TO PROGRAMMING (Python) )مقدمة للبرمجة (بايثون
What is a computer?
A computer is electronic machine that
جهاز الحاسوب هو آلة إلكترونية
Takes data and instructions (input)
)يأخذ البيانات والتعليمات (اإلدخال
Perform operations on data (Processing)
)أداء العمليات على البيانات (المعالجة
Present the results (output)
)تقديم النتائج (اإلخراج
What is a computer?
Use computer to: :استخدم جهاز الحاسوب في
Write Documents كتابة المستندات
Send email ارسل بريد الكتروني
Play games لعب العاب
Browse the web تصفح الويب
Edit or create presentations تحرير أو إنشاء عروض تقديمية
Edit or create videos تحرير أو إنشاء مقاطع فيديو
What is a computer?
Computer have two main parts:
:الحاسوب له جزءان رئيسيان
Computer Hardware
أجزاء الحاسوب
Computer Software
برامج الحاسوب
Computer Hardware
Computer hardware is the physical parts of a computer system, including
Input devices أجهزة اإلدخال
Communication from the user to the computer (Keyboard, mouse, mic).
Output devices أجهزة اإلخراج
Communication from the computer to the user ( Monitor, printer, speakers).
Processor (Central Processing Unit (CPU)) المعالج
The processor is like the brain of the computer;
it organizes and carries out instructions
that come from either the user or the software.
Computer Hardware
Computer hardware is the physical parts of a computer system, including
Primary Memory (also known as Main memory or Internal memory)
Storage for running programs and current data (short term memory)
(RAM, ROM, Cache memory, PROM, EPROM, Registers)
Secondary memory (also known as External memory or Auxiliary memory)
Long-term program & data storage
(Hard Disk, Floppy Disk, Magnetic Tapes, Solid-State Drives (SSDs)
Optical Discs, Flash Memory)
Note
RAM=Random Access Memory
ROM=Read Only Memory
Cash Memory
Note
PROM=Programmable read-only memory
EPROM=Erasable programmable read-only memory
Registers
Note
Hard Disk
Floppy Disk
Note
Magnetic Tapes
Solid-State Drives (SSDs)
Note
Optical Discs
Flash Memory
Computer Hardware
Output devices
Input devices
Printer
keyboard
Speaker
mic
Monitor
mouse
Projector
Camera
Memory Game controller Storage (secondary
(primary devices)
memory) Hard disc
RAM CD
ROM Input and output DVD
devices Flash memory
Fax SSD
Modem
External hard drive
Processor (Central Processing Unit (CPU))
The CPU hardware is designed to perform a finite set of
arithmetic and logic functions
on input data e.g., Addition, subtraction, compare, store, read, multiply etc.
CPU consist of transistors,
that receives inputs and produces output.
Transistors perform logical operations which is called processing.
Processor ((Central Processing Unit (CPU))
Main brands of CPU currently on the market
AMD (Advanced Micro Devices) Intel (Integrated Electronics)
Processor ((Central Processing Unit (CPU))
Main brands of CPU currently on the market
Apple (M1, M1 pro, M1 max, M1 ultra, M2) Qualcomm
Used in MacBook's and iMacs snapdragon
Used in smart phones and tablets
Processor ((Central Processing Unit (CPU))
Main brands of CPU currently on the market
IBM Samsung HiSilicon
Exynos processor Used by Huawei
Processor ((Central Processing Unit (CPU))
List of CPU manufacturers قائمة مصنعي وحدة المعالجة المركزية
ARM Ltd. (sells designs only) Ltd stands for limited
Apple Inc. (ARM-based CPUs) Inc stands for incorporated
إدماج
Broadcom Inc. (ARM-based, e.g. for Raspberry Pi)
Fujitsu
Hitachi
Hygon
Nvidia
Processor ((Central Processing Unit (CPU))
The CPU consists three main parts:
Control unit (CU)
Extracts instructions from memory
and decodes and executes them, calling on the ALU
Arithmetic logic unit (ALU)
Register(memory unit)
Processor ((Central Processing Unit (CPU))
The CPU consists three main parts:
Control unit (CU)
Arithmetic logic unit (ALU)
It is the part of computer processor (CPU)
used to perform arithmetic and logic operations
such as addition, subtraction, etc.
Register(memory unit)
Processor ((Central Processing Unit (CPU))
The CPU consists three main parts:
Control unit (CU)
Arithmetic logic unit (ALU)
Register(memory unit)
Part of the computer that holds data and instructions for processing.
Machine cycle
Each time the CPU executes instruction, it takes a series of steps.
The complete series of steps is called a machine cycle.
Machine cycle
Stages of machine cycle, the series of steps
that are carried out during the machine cycle are:
Fetch stage مرحلة الجلب لألوامر
Control unit takes the instruction that is stored in the main memory
Decode stage مرحلة فك الشفرة
Control unit translates instruction into machine language or binary code.
The Function of the CPU
Stages of the machine cycle the series of steps
that are carried out during the machine cycle are the:
Execution stage مرحلة التنفيذ
Arithmetic logic unit then performs (Execute)
instruction from decode stage.
Storing stage مرحلة تخزين
Arithmetic logic unit
then place the result from execution stage into memory.
Machine Cycle Diagram
Questions
Q1: Choose the correct answer:
1- An example of computer hardware----------------
a) CPU b) Motherboard
c) Storage devices d) all the above
Questions
Q1: Choose the correct answer:
2- Commonly used-------------Devices are keyboard, and mouse.
a) storage b) output
c) input d) mobile
Questions
Q1: Choose the correct answer:
3- Three popular types of-------are hard disk, USB flash and CD
a) software b) storage
c) input devices d) memory
Questions
Q1: Choose the correct answer:
4- The------- carries out the basic instructions done by computer.
a) processor b) registers
c)RAM d) data address
Questions
Q1: Choose the correct answer:
5- What manages and directs the flow of data between each of the
components?
a) Memory b) Motherboard
c) CPU d) Chipset
Questions
Q1: Choose the correct answer:
6- The physical components of a computer are---------- ; the digital programs
running on the------------------------hardware are ?
a) software; hardware b) hardware; software
c) access codes; software d) flashware; software
Questions
Q2: Find the true statement below, then rewrite the remaining false
statement so they are true:
1- A CPU is the main board of computer which connects all hardware
components together.
A (motherboard) is the main board of computer which connects all hardware
components together.
Questions
Q2: Find the true statement below, then rewrite the remaining false
statement so they are true:
2- RAM is an external hardware device.
RAM is an (internal) hardware device
Questions
Q2: Find the true statement below, then rewrite the remaining false
statement so they are true:
3- An output device is any hardware component that allows you to enter data
and instructions into a computer.
An (input) device is any hardware component that allows you to enter data.
and instruction into a computer
Questions
Q2: Find the true statement below, then rewrite the remaining false
statement so they are true:
4- CU (control unit) executes all mathematical and logical operations.
(ALU) executes all mathematical and logical operations
Questions
Q2: Find the true statement below, then rewrite the remaining false
statement so they are true:
5- ALU coordinates all activities of the computer
(CU) coordinates all activities of the computer
Questions
Q3: match the terms with their definitions:
Questions
Q4: Compare between the following.
1- Input devices and output devices
Questions
Q4: Compare between the following.
2- ALU and CU
Questions
Q5: Fill in the Blanks.
Input device are used to get the data and instructions into the computer
1- --------------
for processing.
(hardware)
2- A computer system consists of both ----------------and (software)
-----------------.
3- Processing takes place in that part of the computer known _ _(CPU)
_ __ _ _ _ _
4- (CU) directs and coordinates all the activities within the CPU.
Questions
Q5: Fill in the Blanks.
5- (computer program)is the sequence of instructions performed to execute
one program instruction.
6- (ALU) performs all the arithmetic and logic functions in a
computer.
7- (Output devices) translate information processed by the computer into
a form that the user can understand.
8- (Main memory) holds data and instructions that the computer is
processing at the time.