Introduction
Last month, in computer science Sl, we mainly went through the Topic 2 of the book “CORE COMPUTER SCIENCE“. This chapter has five subtopics: computer architecture, secondary memory, operating and application systems, computer organization, and simple logic gates. This reflection will focus on each content’s definition with examples and graphs provided. The content of the reflection was adapted directly form the text book.
- Computer architecture
- The central processing unit and its element
- RAM and ROM
- The cache memory
- The machine instruction cycle
- Secondary memory
- Persistent storage and secondary memory
- Operating and application systems
- Functions of an operating system
- Software application
- Computer organization
- Bit, byte, binary, decimal and hexadecimal
- Data representation
- Simple logic gates
- Boolean operators; Truth table using Boolean Operators; Logic and Venn diagrams using logic gates
Computer architecture
Computer systems consist of hardware and software components and follow the concept of “input, process, output and storage model“.
–“Core Computer Science“

The graph above indicates the basic model of computer system. A computer system takes in some data as input. Then the computer system processes the data in a manner that the user has requested through set of step by step instructions, and outputs the result in some specific form. During the processing phase, other data, may be needed apart from the inputted. This data will exist in the storage of the computer system and will be fetched during the processing phase. Furthermore, the result and any new data that may arise from the processing phase may also be saved in the storage.
One example of the computer system is the printer. The input is the press on the “print” button on the printer. The process that the computer system inside a printer performs is to display ink on certain position according to the file instructed on a piece of paper. This task requires the original file as the template which is located usually in a secondary memory that is attached by the printer and instructions pre-existed in the storage. Finally the output is the piece of paper printed, which is not saved on the memory in this case, but in most cases, the output is saved in storage.
The central processing unit and its elements
Data or instructions that are processed in the computer system are actually processed by the central processing unit, also known as the CPU. The CPU is a hardware component of a computer system and can perform basic arithmetic, logical or input/output operations, in order to process data from input devices into useful information, the CPU is the “brain” of a computer system and can process data very quickly but can only process data by following instructions-it cannot think for itself.
The CPU contains the:
- control unit (CU)
- arithmetic logic unit (ALU)
- memory address register (MAR)
- memory data register (MDR)
The control unit is responsible for the operation of the CPU. It controls the retrieval of instructions from the primary memory as well as the sequence of their execution.
The arithmetic logic unit performs all the basic arithmetic, logical or input/output operations through logic gates (see the subtopic 5). The CU is responsible for providing the ALU with the data that needs to be processed as well as the instructions of how the data should be processed.
The RAM, random access memory stores the executing program instructions as well as any data that is needed. Instructions and data in the RAM are stored in unique memory locations and every location has an address as well as the instruction content itself. The content is where the instructions and data reside, whereas the memory location is used by the CU to find, retrieve and access the data in order to send it to the ALU for processing.
Similar to the RAM, the ROM, read only memory holds instructions and data in unique memory locations. Every such location has an address as well as content. Unlike the RAM however, the ROM is used to store permanent instructions and data that cannot be changed and are used to boot and operate the computer.
The CU contains:
- memory address register (MAR)
- memory data register (MDR)
The MAR holds the memory address of the data to be used by the ALU, so the ALU can fetch (see in the machine instruction cycle) the corresponding content from the memory and process it accordingly. The MAR may also hold the memory address of where data that has been processed will beed to be stored. (The connection between MAR and primary memory is accomplished by Memory (Address) bus)
The MDR holds the data that is to be used by the ALU, and then saved to the RAM. The data will be loaded onto the MDR for processing by the ALU, whose address is loaded on the MAR in advance. The result is resided on MDR as well after it is processed by ALU and the data is copied to the RAM. (The connection between the RAM and the MDR is accomplished by the Data Bus)
RAM and ROM
The primary memory is the only storage that is directly accessible by the CPU. At any point in time, the primary memory may hold both data and instructions that are currently running on the computer system.
–“Core Computer Sicence“
RAM is a general-purpose storage area, which means that the data stored can be over-written. This allows data and instructions to be loaded for execution and used whenever they are necessary. However, RAM is volatile, which means that when the power is off, the contents in it will be wiped clean.
ROM is used to store instructions and data that cannot be over-written. It is a non-volatile memory, which means when the power is off, the instructions cannot be wiped out clean. Because of its non-volatile nature, it is suitable for store programs and instructions that do not need to be updated or changed like instructions for operating systems (BIOS, basic input/output system).
Some difference between ROM and RAM:
- RAM can be written, while instruction in ROM cannot be changed
- RAM holds the (BIOS) Basic input / output system, but RAM holds the programs running and the data used
- RAM is bigger than RAM in volume
- RAM is volatile, ROM is permanent
The Cache Memory
RAM has two main types:
- Dynamic RAM (DRAM)
- Static RAM (SRAM)
SRAM is faster but more expensive than DRAM, and as such DRAM is preferred for the main RAM of a computer system. However, a small amount of SRAM is placed between the main RAM and the processor and it is called cache. Cache is smaller and faster than RAM which temporarily stores instructions and data so that the processor doesn’t need to access the slower main memory RAM (DRAM.)
Cache holds the information from the RAM that is most actively used, and accessed most frequently, which makes the computer run faster because the slow RAM is accessed less frequently. When the processor needs to read from the main memory, it first checks if a copy of data exists in the cache. If so, the professor will used that, if not the professor will first fetch the data from the RAM and copied that in the cache.
The differences between Cache Memory and RAM
- Cache memory is nearer to the CPU than RAM
- Cache memory is much faster than RAM
- Cache memory is more expensive than RAM
- Cache memory is separated in L1 and L2
The differences between Cache Memory L1 and L2
- Cache L1 is placed on CPU, Cache L2 is placed between the primary memory and the CPU
- Cache L1 is faster than L2
- Cache L1 is more expensive than L2

The Machine Instruction Cycle
The following functions are carried out by CPU in order to run a computer program
Fetch instruction from primary memory to control unit
The CPU is responsible for knowing which instruction it needs to take from primary memory in order to operate correctly. To do that, it sends the appropriate address through memory bus to primary memory. The instruction that resides in the specific address is then copied into data bus and sent to CU.
Decode instruction in control unit
The instruction is decoded by CU. Decoding an instruction allows CPU to be aware of any additional data that are necessary for the execution of the instruction. Any required data that need to be loaded from the primary memory are then fetched. The addresses of these data are placed into the memory bus and data are received by CPU through the data bus.
Execute instruction
The CPU executes the instruction using the necessary data that have been loaded and calculates a result. Depending on the result, additional data maybe needed. These data are fetched from the primary memory for further calculation.
Store result of execution and check for next instruction
After executing the instruction and computing the result, the CPU then save the result in primary memory. To do so, it specifies the address where the result will be reside in the Primary memory, using the memory bus and sends the data through the data bus.
The CPU then checks for the rest instruction and repeats steps described above by fetching, decoding, executing, and storing.
Secondary Memory
Secondary memory is relatively slow memory that may be written to but is also non-volatile; meaning that the contents of the memory are not wiped if power is off but are persistent. That is why secondary memory is also known as persistent storage. Furthermore secondary memory has a relatively high capacity to hold data compared to the primary memory.
When secondary memory exists, it can provides persistent storage to computer system: instructions and data are copied from the secondary memory to the RAM in order for the computer system to run. Because its ability to be over-written, a computer can not only perform fixed operations resides in the ROM and new user data can be accessible in anytime.
If there isn’t a secondary memory in mobile phones to store numbers, the user need to re-enter the names and telephone numbers every time the mobile phone was powered on.

Some types of secondary memory and its volume:
- Hard disk
- solid stake drive (SSD) 64GB-1TB
- disk drive 64GB-1TB
- USB flash drive 1GB-16GB
- Floppy disk 256KB-2.8MB
- Cassette (Magnetic Tape)
- SD cards 500MB-64GB
A list indicating the relationship among volume units
- 1byte=8bits
- 1KB=1024bytes
- 1MB=1024KB
- 1GB=1024MB
- 1TB=1024GB
Differences between Primary and Secondary Memory
- Most computers are quipped with a smaller amount of PM and a larger amount of SM
- PM is volatile, SM is persistent
- PM is more expensive than SM
- PM is much faster than SM
- PM is directly accessed by the CPU
Operating and Application systems
Functions of an operating system
An operating system is a set of software that controls the computer’s hardware resources and provides service for computer programs. It is a very important part of a computer system since it acts as an intermediary between software applications and computer hardware.
–“Core Computer Science”
In a computer system a user would interact with an application that has been designed to meet the user’s needs. This application would require an operating system in order to function. This operating system would allow the application to interact with the hardware of the computer system thanks to a number of services.

The main services that an operating system provides:
- Peripheral communication: Peripheral devices are all the hardware components of the computer systems outside the CPU, which means the input/output devices. The OS is responsible for communicating directly with the hardware and providing an interface between hardware devices and applications. Examples are like keyboards, monitors, mice, printers, microphones.
- Memory management: OS is responsible for all the memory that is available in the computer system. It manages how the memory is used by the application and ensures one application does not interfere with memory that is being used by others
- Resource monitoring and multitasking: OS is responsible for the efficient allocation of resources so that an application can run as effectively as possible. Multiple application may run on a computer system at any one time, so the OS manages each application to share the single CPU in turns to accomplish their goal (perform parts of the tasks each.)
- Networking: an OS manages connection to and interactions with networks of other computer system so as to allow the sharing of resources. Such as files and printers.
- Disk access and data management: OS is responsible to access data stored in memory and disks. Data are stored using files which are structured in a way to make better use of the space available to the system. Os is responsible for keeping track of these files as well as making sure an application doesn’t overwrite another one’s file. The OS is also responsible for coordinating the transfer of data from the disk files into the primary memory.
- Security: OS is responsible for the overall security of a computer system. One example is to provide password service to make sure other person can’t access to one’s information.
Some important examples of major OS at the moment are OS X, Linux, UNIX, and Microsoft Windows.
Software application
Computer allow for the use of a range of software applications on them, instead of being able to complete only on predefined task. The main software application that may be installed on such computer systems include:
- Word Processor: It is used for the production of any sort of document. It includes tools for the composition, editing, formatting and possibly printing of documents. (Microsoft Word, Pages)
- Spreadsheets: It is used for the organization and analysis of data. The data in a spreadsheet application is represented as cells, organized in rows and columns.It allows fundamental operations of arithmetic and mathematical functions and common financial and statistical operations. (Microsoft Excel, OpenOffice Calc)
- Database management system: it manages databases and is designed to provide an interface between users and a database. (MS ACCESS)
- Web browsers: It is used to access, retrieve, and present content on the World Wide Web. This content may be web pages, images, videos or other files. (IE, Google Chrome, Firefox, Safari)
- Email: It allows for the exchange of digital message from a single author to one or more recipient(s). The author and the recipient(s) do not need to be online simultaneously to exchange the email. The author of the email sends it to the email server, which then is connected by the recipient(s).
- Computer Aided Design: It is a software that assists engineers to create, modify, analyze and optimize a design. (AutoCAD, Dassault Systems Solid Works)
- Graphic Processing software: It allows a user to manipulate visual images on a computer. A user can edit an image with the use of tools in various ways, such as selecting and moving, cropping, scaling , erasing. (Adobe Photoshop, Corel Draw)
Computer Organization – Binary representation
Bit, byte, binary, decimal and hexadecimal
Computer system are binary systems that use sequences of bits to represent data. A binary digit is the basic unit of information in computer system and an have only two values either 1 or 0.
Decimal number system is a positional system that uses then digits (0,1,2,3,4,5,6,7,8, and 9) to represent any number.

Binary number system is a positional system that uses two digits (0 and 1) to represent any number.

Two’s complement is the way most modern computer represent signed binary numbers. The main advantage of this representation is that addition, subtraction and multiplication are carried out easily. Which means the first bit of a byte represents -128.
Binary fractions is performed by indicating the first 4 bits for the integer part and 4 bits for the fractional part. So this is a fixed point representation method.

Hexadecimal number system is a positional system that uses 16 digits (0,1,2,3,4,5,6,7,8,9, A=10, B=11, C=12, D=13, E=14, F=15) to represent any number.

Data representation
Computer systems are binary systems, meaning that there are only two possible values that they can represent: the values 0 and 1. These two values can be represented by a single bit. In order for such system to represent more complex data, sequences of binary digits are used. The length of these binary digit sequences determines the possible number of different representations that can be achieved.
While representing characters: The American Standard Code is a character-encoding scheme originally based on the English alphabet. This means that ASCII is used to represent text in computer systems.
While representing strings: a string is a sequence of characters. It is just a simple assemble of characters represented by bytes.
While representing colors: Colors are represented by using pixel, which is the smallest controllable element in a display or of a picture represented on the screen. Every pixel has only one color at a time which is represented in the hexadecimal RGB color values that specify the amount of Red, Green, and Blue light combining different shades of each other that need to appear at a pixel, in order to produce a specific color. Each color value is represented as a hexadecimal value of two digits that may take up values from 00 to FF.
Simple logic gates
Boolean operators
Computer systems are made up of electrical circuits and use the binary system to represent and store data. Electrical circuits have been designed to receive one or more binary numbers as their inputs and produce a single output. The logical operations of these circuits are governed by the rules of Boolean Logic.
–“Core Computer Science”
The And Boolean Operator

The Or Boolean Operator

The Not Boolean Operator

The Nand Boolean Operator

The Nor Boolean Operator

The Xor Boolean Operator

Various symbols and shapes used for Boolean Operators

Reference
all retrieved from Expressing Publishing.(2015). Core Computer Science.





























