0% found this document useful (0 votes)
63 views8 pages

Lesson 1: Computer System Components: The Relationship of The Components Is Shown Below

The document discusses the key components of a computer system: 1) Input, process, and output are the main components, with the CPU processing input data and producing output. 2) The CPU contains a control unit, registers, and ALU to control operations and perform calculations/logic. 3) Programs are written in code but must be compiled into machine language for the CPU to execute instructions. 4) Variables store and represent data in programs, with different data types like integers, floats, characters, and strings.

Uploaded by

prettyhandsome11
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views8 pages

Lesson 1: Computer System Components: The Relationship of The Components Is Shown Below

The document discusses the key components of a computer system: 1) Input, process, and output are the main components, with the CPU processing input data and producing output. 2) The CPU contains a control unit, registers, and ALU to control operations and perform calculations/logic. 3) Programs are written in code but must be compiled into machine language for the CPU to execute instructions. 4) Variables store and represent data in programs, with different data types like integers, floats, characters, and strings.

Uploaded by

prettyhandsome11
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 8

Lesson 1:

Computer System Components

In computer system, one cannot have an understanding of its operation


without the careful analysis of its components. As a starter, it is important to first
lean the basics and relationship of these components.

When we are given an objective to compute large numbers, the first


instinct that comes to our mind is use a calculator. When we have the calculator,
there are things that we think and do unconsciously. The first response upon
knowing the objective is automatic, we immediately analyze the objective is
automatic, we immediately analyze the objective by identifying the mathematical
operations needed (addition, subtraction, multiplication, division, exponentiation,
etc.) then, we input the data to be computed by pressing the numbers and the
identified mathematical operations, we then press the equal sign key to process the
inputted numbers. The result is then shown on the display of the calculator; this
result whether correct or erroneous is what we call output.

The relationship of the input, process, and output components producing


the result doesn’t stop there. The output we see on our calculator provides two
things, first is the incorrect result, and second is the correct result. We get incorrect
result when we accidentally input wrong data by pressing either negative values or
error results. When we get correct result from our calculation, chances are another
instinct comes in our mind; we either use the result again as an input for another
computation, or store the computed result in the memory for future computations.
These output whether correct or incorrect, and whether used as input for another
computation is the feedback component of the computer system.

The relationship of the components is shown below:

INPUT PROCESS OUTPUT


The Blue Print

The relationship of the components is the blue print of a computer system.


Blue print is the logic and ideas transformed into a map of how computer should do
things. It is implemented through software (instructions that tells the computer what to
do) and executed through the interaction of different hardware devices (physical
computer itself). Blue print also serves as the basis of how a computer functions, and
how data are processed inside the computer.

Let us have a step backward, recall that in a computer system, we key in


using a keyboard or mouse data for processing—data in computer system refers to
numbers, alphabets and alphanumeric characters. The entered data is then processed by
the Central Processing Unit (C.P.U.). The C.P.U. inside the computer box is just a tiny
square piece of

Integrated Circuit attached on the mother board that normally has a dimension of 1” x
1”, though small in size, its functions in the computer system is enormous because it
functions as the brain of the computer.

Central Processing Unit Components

The computer brain (C.P.U.) has different components that work cooperatively to
Execute instructions. These components are:

 Control Unit (C.U.) – The command center of the processor. It has three primary
functions: read and interpret instructions, direct flow of operations of computer
and hardware devices and, control the flow of instructions and data.

 Register – A temporary storage microchip that holds data during processing. It


is located inside the CPU and has the same function that of a memory,
specifically the type Random Access Memory (R.A.M.) because of its volatile
character – data are lost once electric current is turned off; it just holds data
temporarily for processing.

 Arithmetic and Logic Unit (A.L.U.) – the most significant component inside the
C.P.U. for our learning of the “behind the scene”. It is the chief of operations of
the computer. A.L.U. performs two major operations in processing data: all
mathematical computations (addition, subtraction, multiplication, and division)
and all logical operations(comparisons of data such as; greater than, less than,
equal, greater than or equal to, and less than or equal to). These processing are
the main concentration of how a computer process data, and is the foundation of
the “behind the scene”.
Behind the scene in action

As we have read the blue print of behind the scene, it is now clear why a
computer is defined as an electronic device that can accept, process, and store vast
amount of data to produce useful information. Let us now zero in on behind the scene
and understand its language of ABC.

Computer programmers write computer instructions in computer programming


Language. Just as people speak their native dialect, programmers write programs in
different languages; some examples are C++, Visual Basic, Java and COBOL. No
matter which programming language a Computer programmer uses, the language has
rules governing its terminology and punctuation. These rules are called the language’s
syntax. This syntax is a rule that governs a programming language is unique and have
their specific set of syntax.

When ideas are converted into a computer program, it is sent to the CPU
processing. However, The CPU cannot understand the code (computer program) and will
not do anything because of language incompatibility. For the CPU to understand the
code, a language translator is needed. The language translator software is called compiler
or interpreter. The role of compiler is to transform the code into a machine language
(series of 1’s and 0’s to represent ON and OFF states of the computer devices. It is also
the representation of the digital electronic charges inside the computer). Once the code is
compiled, it changes its form from computer program with strict syntax to a readable
machine language that can be interpreted by the CPU. CPU then executes the
instructions and performs the tasks.

Lifeblood of a Computer System

Tasks executed by the CPU vary from simple acceptance of data to


a complex merging of different files. Whatever tasks the CPU is instructed to perform,
the instruction would have to be in the language of computers. Computer program is the
lifeblood of a computer system it is the fluid that runs through the veins of the
computer that tells what the organs to function and what action to perform. With the
analogy, we can define computer program or codes a set of logical instructions given to
a computer for data processing that is interpreted by a compiler to produce useful
information.

Programmers integrate ideas to a code in no simple way. In their practice of


developing computer programs, it brings to them the hurdles to accomplish the task.
Being new to programming, we might not be ready yet to overcome the challenges. As
a guide, programmers suggest to observe the following guide questions in planning and
developing a program:
1. What is the problem?
2. What are the available data?
3. What output information or data is needed?
4. When do you need the output?
5. What processing is needed to produce the output?
6. What is the desired output?
7. Where should the output go?

We can now agree that code is the gasoline that powers the computer. It is now
the role of behind the scene to translate ideas into a form that is friendlier and easier to
understand and illustrate. Behind the scene can be illustrated by the use of flow chart.
Flowchart is a modeling tool used to illustrate data, instructions, process, information,
and workflow by the use of specialized symbols. In the world of computers we can
simply say that flow chart is a step-by-step graphical representation of a solution. The
basic symbols used in programming are presented in Table 1.

BASIC FLOWCHART SYMBOLS


Variables

The next most important thing to know is how data are represented in the
program. Recall that data are entered into the program using a keyboard or mouse, and
the data entered for processing are saved on a certain location. This location is called
variable. Variable is a primary storage location that can assume different numeric or
alphanumeric values. It is also a memory space allocated by a computer user for
processing and storing data.

Variables like humans need names to be identified. Microsoft suggests a


variable naming convention called Hungarian Notation. Hungarian Notation specifies a
variable with both the data type and its description. The first three characters in this
notation specify the data type and the remaining characters are the description of the
variable.

Date type is the type of the data being processed in the program. However,
data type is language specific and may have different representations. Table 2 shows
the basic data types with their descriptions

Basic Data Types

DATA TYPE DESCRIPTION EXAMPLE


* Integer Whole Number 10 355 1590
54765 1 34000
** Float or Double Integer with Decimal 3.1416 0.12 1.01
Numbers 12.120 99.99 0.04
* Character Alphabets and special JWA
characters *&?
* String Combination of Characters Sum age int_1
A total grand total
* Boolean Reply of the computer in Value are either 1 for YES
the program that is or 0 for NO
performed behind the seen

*used mostly by all programming languages


**C/C++, Java, Visual Basic and other programming language specific
*** Note that the data types above are not the only data types used in programming.
Other programming language may have their own set of data types with specific
descriptions that are not presented above.
Sample Variable names using Hungarian Notation

VARIABLE NAME DATA TYPE DESCRIPTION


Intsum Integer Sum
Dbl Tax Double Tax
FltRate Float Rate
ChrReply Character Reply
StrLname String Lname
BooAns Boolean Ans

Data type is important in programming. However, data type is unique to


every programming language. In the study of programming logic, data types will not be
integrated in the discussion to allow pure analysis and logic development among
students.

The standard naming convention for variables used without any biases to any
Programming language are presented through its characteristics

Variables name characteristics:

 Must be descriptive and significant to the data, problem and its solution. It
should be descriptive enough to identify the process or data it is referring to.
 Combinations of alphanumeric characters (alphabet, numbers and special
characters) can be used as a variable name provided that it starts with an
alphabet.
 Although the length of variable name can have 256 characters, the lesser the
number of characters the more efficient the program is.

Examples:
Class_size tuition intl income
sum char3 f_name answer
net_income l_name total grand_total

Computer Operators: Processing Data

The languages of computers need to be converted to a language that the CPU


can understand. For the programmer to instruct computers to process mathematical
computations and logical operations, they would have to define symbols that the
computers can understand. The symbols presented are the generic symbols used by
computers for processing. However, as you progress to the different programming
languages the mathematical and relational symbols may vary.
ARITHMETIC OPERATORS

OPERATION SYMBOL EXAMPLE EXPLANATION


Multiplication * A*B Multiply the value
of variable A to the
value of variable B
Division / X/Y Divide the value of
variable X by the
value of variable Y
Addition + In1 + In2 Add the value of
variable In1 to the
variable In2.
Subtraction - A–B Subtract the value
of variable B from
the value of variable
A.
Exponentiation ^ C^2 Square the value of
variable C.

In the examples, it is important to note that the arithmetic hierarchy of


computation still applies in computers. The addition of exponentiation and
parenthesis is now included in the hierarchy giving the “MDAS” added acronyms,
PEMDAS (Parenthesis, Exponentiation, Multiplication, Division, Addition and
Subtraction)

OPERATION SYMBOL EXAMPLE EXPLANATION


Greater than > A>B The value of the
variable A is greater
than the value of
variable B.
Less than < X<Y The value of the
variable X is less
than the value of
variable Y.
Learning exercises:
1. Create a flowchart that will store the value of A and B, where A= 5.
2. Create a flowchart that will assigned stored value of C to both A and B where A =15,
B = 10 and C = 20
3. Create a flow chart that will move the value of A and B and B to C. The values of the
Variables are: A = 25, B = 30 and C = 35

4. Create a flowchart that will arrange the values of A, B and C in ascending order
where Variable A will gets the lowest value and variable C gets the highest value. The
values of the variables are: A = 15, B = 10 and C = 20.

5. Create a flowchart that will arrange the values of A,B,C and D in highest to the
Lowest order where variable A gets the highest value and variable D gets the lowest
value. The values of the variables are: A = 3, B = 9, C = 12 and D = 6

Solution:

The uses of initialization in this flowchart are three


things:
1) Allocate two memory locations for variables A and

B;
2) Assign number 5 to variable A; and
3) Assure that variable B has no value.

The expressionB=A is an assignment operation. The


value of variableB, Destroying the original value,0 of
variableB. After the assignment process, the new
value of VariableB is5.

You might also like