TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
Week 01.pdf
1. An Overview of the Computer
System
• Lecture link:
• https://www.youtube.com/watch?v=Hwm6qHShAq4&list=PLVEVLI2v6thVDz7UxUPnU
RUKaqWFK7Z7v&index=1
2. This lesson includes the following sections:
• The Parts of a Computer System
•Program & Programming Language
•Looking Inside the Machine
3. The Parts of a Computer System
• What is a Computer?
• Hardware
• Software
• Data
• Users
4. • A computer can convert data into information that is
useful to people.
• A complete computer system includes four distinct
parts:
Hardware
Software
Data
User
The Parts of a Computer System
- What is a Computer?
A computer is an electronic device used to process data.
5.
6. • A computer's hardware consists of electronic
devices; the parts you can see and touch.
• The term "device" refers to any piece of hardware
used by the computer, such as a keyboard, monitor,
modem, mouse, etc.
The Parts of a Computer System - Hardware
7.
8. • Software – also called programs – consists of
organized sets of instructions for controlling the
computer.
• Some programs exist for the computer's use, to help
it manage its own tasks and devices.
• Other programs exist for the user, and enable the
computer to perform tasks for you, such as creating
documents.
The Parts of a Computer System - Software
9. • Data consists of raw facts, which the computer can
manipulate and process into information that is
useful to people.
• Computerized data is digital, meaning that it has
been reduced to digits, or numbers. The computer
stores and reads all data as numbers.
• Although computers use data in digital form, they
convert data into forms that people can
understand, such as text, numerals, sounds, and
images.
The Parts of a Computer System - Data
11. • People are the computer's operators, or users.
• Some types of computers can operate without
much intervention from people, but personal
computers are designed specifically for use by
people.
The Parts of a Computer System – Users
12. Looking Inside the Machine
• Types of Hardware
• The CPU
• Memory
• How Memory is Measured
• Input and Output Devices
• Storage Devices
13. A computer's hardware devices are categorized as
follows:
• Processor
• Memory
• Input and output (I/O) devices
• Storage devices
Looking Inside the Machine –
Types of Hardware
15. Looking Inside the Machine - The CPU
The procedure that
transforms raw data
into useful
information is called
processing. This
function is divided
between the
computer's processor
and memory.
The processor
is also called
the central
processing
unit (CPU). It
manages all
devices and
performs the
actual
processing of
data.
The CPU consists of one or more chips attached to the
computer's main circuit board (the motherboard).
16. • Memory also consists of chips attached to the
motherboard.
• Memory holds data and program instructions as
the CPU works with them. This memory is called
Random Access Memory (RAM).
• The CPU can find any piece of data
in RAM, when it needs it for processing.
• RAM is volatile, meaning it holds data
only when the power is on. When the power
is off, RAM's contents are lost.
Looking Inside the Machine - Memory
17. • The smallest usable unit of measure for memory is
the byte – the amount of memory required to hold
one character, like the letter A or the numeral 2.
• Computers work with larger chunks of data,
measured in multiple bytes, as shown below:
Unit Approx. Value Actual Value
(bytes) (bytes)
Kilobyte (KB) 1,000 1,024
Megabyte (MB) 1,000,000 1,048,576
Gigabyte (GB) 1,000,000,000 1,073,741,824
Terabyte (TB) 1,000,000,000,000 1,099,511,627,776
Looking Inside the Machine
– How Memory is Measured
18. • Input devices accept data and instructions from the
user or from another computer system. The keyboard
and mouse are examples of input devices.
• Output devices return processed data back to the user
or to another computer system. The printer and
monitor are examples.
• Communications devices (such as modems and
network interface cards) perform both input and
output, allowing computers to share information.
Looking Inside the Machine –
Input and Output Devices
19. • Storage devices hold data not currently being used
by the CPU. Data is commonly stored on a magnetic
or optical disk. Each type uses a special medium for
storing data on its surface.
• A disk drive is a device that reads data from and
writes data to a disk. Most new computers feature a
floppy disk drive, a hard disk drive, and an optical
disk drive.
• The most common optical storage devices are CD-
ROM and DVD-ROM drives.
Looking Inside the Machine - Storage Devices
20.
21. Software: Bringing the Machine to Life
• What is Software?
• System Software
• Application Software
22. • Software is a set of electronic instructions that tells the
computer how to do certain tasks. A set of instructions
is often called a program.
• When a computer is using a particular program, it is
said to be running or executing the program.
• The two most common types of programs are system
software and application software.
Bringing the Machine to Life –
What is Software?
23.
24. • System software exists primarily for the computer
itself, to help the computer perform specific
functions.
• One major type of system software is the operating
system (OS). All computers require an operating
system.
• The OS tells the computer how to interact with the
user and its own devices.
• Common operating systems include Windows, the
Macintosh OS, OS/2, and UNIX .
Bringing the Machine to Life –
System Software
26. Von-Neumann proposed his computer architecture
design in 1945 which was later known as Von-
Neumann Architecture. It consisted of a Control
Unit, Arithmetic, and Logical Memory Unit (ALU),
Registers and Inputs/Outputs.
Von Neumann architecture is based on the stored-
program computer concept, where instruction data
and program data are stored in the same memory.
This design is still used in most computers
produced today.
Von-Neumann Architecture
27. Historically there have been 2 types of Computers:
Fixed Program Computers – Their function is very specific
and they couldn’t be programmed, e.g. Calculators.
Stored Program Computers – These can be programmed to
carry out many different tasks, applications are stored on
them, hence the name.
The modern computers are based on a stored-program concept
introduced by John Von Neumann. In this stored-program
concept, programs and data are stored in a separate storage
unit called memories and are treated the same. This novel idea
meant that a computer built with this architecture would be
much easier to reprogram.
Von-Neumann Architecture
28. Von-Neumann machine is also known as IAS
( Institute for Advanced Study) computer and is
having three basic units:
1. The Central Processing Unit (CPU)
2. The Main Memory Unit
3. The Input/output Device
Von-Neumann Architecture
30. Whatever we do to enhance performance, we cannot get
away from the fact that instructions can only be done one at
a time and can only be carried out sequentially.
This is commonly referred to as the ‘Von Neumann
bottleneck’. We can provide a Von Neumann processor with
more cache, more RAM, or faster components but if original
gains are to be made in CPU performance then an
influential inspection needs to take place of CPU
configuration.
Von Neumann bottleneck
31. Basics of Programming Language
Lecture link:
https://www.youtube.com/watch?v=XRF60qBVo4s&list=PLVEVLI2v6th
VDz7UxUPnURUKaqWFK7Z7v&index=4
32. Basics of Programming Language
• Program
– A set of instructions to perform a specific task or
function
• Programming Language
A programming language is a formal language that
specifies a set of instructions that can be used to
produce various kinds of output. Programming
languages generally consist of instructions for a
computer. Programming languages can be used to
create programs that implement specific algorithms
33. Programming language
• Programming languages can be classified
into two broad categories:
• Special purpose: is designed for a particular
type of application
– Structure Query Language
• General purpose: can be used to obtain
solutions for many type of problems
– Machine languages
– Assembly languages
– High level languages
34. Source code
• Source code is the actual text that is used to construct the program
using the language of choice. you write this text by following the
language syntax.
Intermediate code
• Intermediate code is used to translate the source code into
the machine code. Intermediate code lies between the high-
level language and the machine language.
Machine code
• Machine code is a computer program written in machine language.
It uses the instruction set of a particular computer architecture. It is
usually written in binary. Machine code is the lowest level of
software. Other programming languages are translated
into machine code so the computer can execute them.
35. Semantics and Syntax
• Semantics
• The meaning of the language within a given context
• Describes the processes a computer follows when
executing a program in a language
• E.g if true then S1 else S2
• Syntax
• It refers to the rules to join words to form a correct
expression
• It is the format to write instructions in a program.
• int a; // statement syntax is correct
36. Interpreter, Compiler and Editor
• Editor
• Programs used to write a computer program
• Interpreter
• A computer program that translates instructions written in a high-
level language to an intermediate form which are then executed
• Compiler
• A computer program which translates instructions (source code) in
a high-level language into a machine code(byte code)
• Decompiler
• A program that translates from a low level language to a high
level language.
37. Programming paradigms
• Programming paradigms are a way to classify programming
languages based on their features. Languages can be
classified into multiple paradigms.
• Some paradigms are concerned mainly with implications for
the execution model of the language, such as allowing side
effects, or whether the sequence of operations is defined by
the execution model.
• Other paradigms are concerned mainly with the way that
code is organized, such as grouping a code into units along
with the state that is modified by the code.
• Yet others are concerned mainly with the style of syntax and
grammar.
38. Imperative programming
• In computer science, imperative programming is
a programming paradigm that uses statements that change a
program's state. In much the same way that the imperative
mood in natural languages expresses commands, an imperative
program consists of commands for the computer to perform.
Imperative programming focuses on describing how a program
operates.
39. Declarative programming
• Declarative programming is a programming paradigm—
a style of building the structure and elements of
computer programs—that expresses the logic of
a computation without describing its control flow.
40. Modular programming
• Modular programming is a paradigm that
emphasizes separating the functionality of
a program into independent,
interchangeable modules, such that each
contains everything necessary to execute only
one aspect of the desired functionality.