Pembahasan Arti Program, Software, Hardware, Brainware: Mata Kuliah P. B. Pemrograman Oleh: Ika Maulid Nur Ahmad, ST, MM
Pembahasan Arti Program, Software, Hardware, Brainware: Mata Kuliah P. B. Pemrograman Oleh: Ika Maulid Nur Ahmad, ST, MM
PROGRAM, SOFTWARE,
HARDWARE,
BRAINWARE
MATA KULIAH
P. B. PEMROGRAMAN
Oleh :
Ika Maulid Nur Ahmad, ST, MM
PENILAIAN
Concept:
of a computer system
Hardware
Central Processing Unit (CPU)
The CPU is the part of a computer that runs the
programs.
Without a CPU a computer cannot run software.
Running or executing a program is the term used
when the computer performs the tasks that the
program tells it to do.
Hardware Figure 1-2 The ENIAC computer
ENIAC (courtesy of U.S. Army Historic Computer Images)
• Main Memory
• Considered the computer’s work area
• Stores the program that is running as well as the data
• Commonly known as the random-access memory (RAM)
• Data is quickly accessed
• RAM is a volatile type of memory
• Used for temporary storage
• RAM is erased when computer is turned off
Hardware
• Secondary Storage Devices
• Type of memory that can hold data for long periods of time.
• Programs and important data are stored in secondary storage
• Disk drive is a common type of secondary storage
• Data is stored by magnetically encoding it onto a circular disk
• Most computers have an internal disk drive
• Some have external disk drives; they are used to create backup
copies
Hardware
• Input Devices
• Any data the computer collects from people and from other devices is called input.
• The hardware component that collects the data is called an input device.
• Common input devices are:
• It does not contain a disk
• The data is stored on flash memory
• Also known as memory sticks and flash drives
• Inexpensive, reliable, and small
• Output Devices
• Any data the computer produces for people or for other devices is called
output.
• The hardware component that formats and presents the data is called an
output device.
• Common output devices are
• Monitor
• Printer
Concept:
• Storing Numbers.
• A program is a set of instructions that tells the computer what to do.
• The positive charge or the on position is represented by the digit 1
• The negative charge or the off position is represented by the digit 0
• This corresponds to the binary numbering system where all numeric
values are written as a sequence of 0s and 1s
• Each digit in a binary number has a value assigned to it
• Storing Numbers.
• The largest value that can be stored in a byte with eight bits is 255
• Two bytes are used for larger numbers; maximum value is 65535
• Storing Characters.
• Characters are stored in the computer’s memory as binary numbers
• ASCII (American Standard Code for Information Interchange) is a
coding scheme
• Storing Characters.
• ASCII is a set of 128 numeric codes
• ASCII is limited
• Unicode is an extensive encoding scheme
• It is compatible with ASCII
• It represents characters for many languages in the world
How Computers Store Data
• Negative Integers
• Binary numbering system can be used to represent only integer
numbers, beginning with 0.
• Negative numbers are encoded using two’s complement
• Real Numbers
• Binary numbering system can be used to represent only integer
numbers, without a fractional part.
• Real numbers are encoded using floating-point notation
How Computers Store Data
• Other Data Types
• Digital data is data that is stored in binary
• A digital device is any device that works with binary data
• Digital images are composed of tiny dots of color known as pixels
(picture elements)
• Digital sound is broken into small pieces known as samples
How a Program Works
Concept:
• Procedural approach
• Examples: COBOL, FORTRAN, BASIC, C, C++, and Pascal
• Object-oriented approach
• Examples: Smalltalk, C++, and Java
Why Programming?
• To Develop Problem Solving Skills
• It is very important to develop problem
solving skills. Programming is all about solving problems.
• Requires creativity and careful thought.
• Analyze the problem and break it down into manageable parts
(modules, procedures, functions)
• 5. Interpretation
• The program may execute without any obvious errors.
• It may not produce the results which solve the problem.
• Get what you ask for, not what you want.
• Recheck your program with the original specifications
Top Down Design
M a in T a s k
S u b ta s k S u b ta s k S u b ta s k
Top Down Design
• Pseudocode
• is written in English with C++ like sentence structure and
indentations.
• Major Tasks are numbered with whole numbers
• Subtasks use decimal points for outline.
Top Down Design
Writing Programs
• Vocabulary
• reserved words
• have a predefined meaning that can’t be changed
• library identifiers
• words defined in standard libraries
• programmer supplied identifiers
• defined by the programmer following a well defined set of rules
Writing Programs
• Syntax
• rules for construction of valid statements, including
• order of words
• punctuation
Writing Programs
• Executable Statement
• basic unit of grammar
• library identifiers, programmer defined identifiers, reserved words,
numbers and/or characters
• A semicolon terminates a statement in many programming languages