CHAPTER 2 - COMPUTER ORGANIZATION Flashcards
Computer system
Hardware and software components that follow input, process, output, and storage model
CPU
Hardware component that performs basic arithmetic, logical and input/output operations in order to process data from input devices into useful information
4 components of CPU
CONTROL UNIT
ARITHMETIC LOGIC UNIT
MEMORY ADRESS REGISTER
MEMORY DATA REGISTER
CONTROL UNIT
Responsible for all operation in CPU; it controls retrieval of information from the primary memory and the sequence of their execution
MDR
It holds the data to be used by the ALU and saved to the RAM. To communicate with the primary memory, it is connected to the memory data bus.
Primary memory
the only memory directly accessible by the CPU. It may hold both data and instructions that are currently running on the computer system in binary machine code
ALU
Performs all the basic arithmetic, logical, input/output operations using instructions provided by the CU
MAR
It contains memory addresses of data to be used by ALU and processed data to be stored. To communicate with the RAM, it is connected to the memory address bus
Data bus
delivers data from the primary memory to the ALU and from ALU to the MDR and then to memory
RAM
A general purpose storage area meaning that data stored can be overwritten. This allows data ad instructions to be loaded for execution and used anytime necessary. However, it is volatile, meaning that if power is lost, the contents of the memory is lost as well. (E.g.: an open document with unsaved changes, when power is lost, all changes with be lost)
ROM
It is used to store data and instructions that cannot be overwritten. This means that data embedded in the ROM cannot be changed even when power is lost, therefore is non-volatile memory. It is also used to store data/instructions that does not need to be updated. (Ex: start up instructions of an OS)
Differences of RAM and ROM
- ROM cannot be written to, but RAM can written to
- ROM is non-volatile (permanent) while RAM is volatile
- ROM is much smaller than RAM
- ROM contains BIOS while RAM holds the programs running and data used
Cache memory
holds information from the RAM that is most actively used, and accessed frequently by the CPU; the computer system will run faster as the slower main memory will need to be accessed less frequently
How does cache memory work
When the processor needs to read from the main memory, it first checks if the copy of the data is available in the cache. If so, the processor would not have to access the slower main memory and reads from the cache, speeding up the process.
2 main types of RAM
- Dynamic RAM (DRAM)
- Static RAM (SRAM)
Differences between Cache memory and RAM
- Cache memory is near to CPU than RAM
- C.M more faster than RAM
- C.M more expensive than RAM
- C.M is separated in L1 and L2
Machine instruction cycle
It is a basic operation cycle of a computer, taking place in a definite time period, in which one instruction is fetched from the main memory and executed. It consists of 4 stages: fetch, decode, execute, and store.
Secondary memory
(auxiliary storage) is a relatively slow memory that may be written to like RAM but non-volatile like ROM; meaning contents are not lost if power is lost. Therefore, secondary memory is also called as persistent storage. It has a relatively high capacity to hold data compared to primary memory.
Types of secondary memory devices
- Flashdrives
- Hard disk drives
- Bluray disks
- CDS
- DVDS
- Magnetic tape
- Floppy disk
- Zip disk
Differences between primary and secondary memory
- P.M more expensive
- P.M faster than S.M
- P.M directly accessible by CPU
- S.M not directly accessible
- S.M non-volatile (retains data when power is lost)
- P.M volatile (doesn’t retain data when power is lost)
Operating System
It is a set of software that controls computer’s hardware resources and provide services for computer programs. It also acts as an intermediary between computer’s hardware and software applications.
Main services of OS
- Memory management
- Peripheral communication
- Resource monitoring and multitasking
- Networking
- Security
- Disk access and data management
Types of software application
- Word processors
- Spreadsheets
- Database management systems
- Web browsers
- Computer Aided Design (CAD)
- Graphic processing software
Difference between Spreadsheet software application and Database management System
- DTBM preserves data integrity easier
- SS can hold limited info
- SS can be used to produce charts/graphs using automated software tools
- DTBM used for various data associations that cannot be created with SS
Advantages and disadvantages of CLI and GUI
pros of CLI:
- easier to implement by a programmer
- requires less memory to run
cons of CLI:
- users need to remember specific commands = hard for new users to use
pros of GUI:
- users do not need to remember specific commands
- users use icons to remember commands; grouped in menus and toolbars
cons of GUI:
- requires more memory
- requires a graphical monitor and a pointing device
GUI
Graphical User Interface; a digital interface in which a user interacts with graphical components such as icons, buttons, and menus
GUI elements
- Toolbar (buttons, icons and menus/input/output elements are placed)
- Menu (displays a list of commands that can be chosen by the user to perform various functions)
- Dialogue box (communicate information to the user and allow him/her to respond by choosing an option from a list of specific choices)
Outline how a color can be represented in a computer
A color can be represented in a computer using pixels, where each pixel is individually made up of a combination of shades of red, green and blue. The amount of red, green and blue light that needs to appear at a pixel is specified by hexadecimal digits/RGB color values. For example, the pixel represented by hexadecimal RGB color value 70EF5A shows lime green.
Identify two essential features of a computer language
- Consistent syntax and grammar
- Unambiguous meaning/instructions
State why hexadecimal numbers are frequently used in computing
Hexadecimal numbers are used to represent colors and store its information in computing; help shorten the processing of data as they are often represented through lengthy binary numbers
State the number of bits used to represent a non-primary colour, such as yellow
3 x 8 bits = 24 bits / 3 bytes
State the maximum number of colors that can be represented in a computer pixel
RRGGBB: RR = 256 colors; GG = 256 colors; BB = 256 colors so total 16,777,216
CLI
a command line program that accepts text input to execute operating system functions
Calculate how many different colors can be represented using two hexadecimal characters
16 x 16 = 256 different colors
Explain the importance of the memory management function of an operating system
Memory management refers to the allocation of memory being used by different applications within a computer system. This function of the OS is necessary to ensure that one application does not interfere with the memory of another application to avoid the latter having functioning errors or overwriting of data.
Byte (B)
8 binary digits (0s and 1s); one letter
ASCII
American Standard Code for Information Interchange; a character encoding scheme that represent 128 different characters; enough for the lowercase and capital letters of the 26 letter Latin alphabet, digits of decimal numbering system, as well as the space, punctuation and control characters
UNICODE
character encoding scheme that contains all ASCII characters; more specialized Latin letters with diacritics, Greek, Hebrew, Arabic alphabets
bit (b)
basic unit of information in computer systems and can have only 2 values either 1 or 0
Peripheral communication
OS is responsible for communicating directly with the computer hardwares outside the CPU, (peripheral devices e.g. keyboards, monitors, mice, printers, microphones etc) and provides a user interface between hardware devices and applications.
Disk access and data management
OS has the ability to access data stored in memory and disks. It is also responsible for coordinating the transfer of data from disk files into the primary memory and vice versa.
Offers File management services by sorting out where data is stored on the disk drives and memory. It allows users to organize files in folders as well as to copy and delete files.
Ex: in laptop the hard drive is the C: drive, CD-ROM or other disc drive is the D: drive.
Networking
OS manages connections and interactions with networks of other computer systems to allow sharing of resources like files/printers. It allows applications to interact with networks in a straightforward manner.
Resource monitoring and Multitasking
OS is responsible for efficient allocation of resources for each application so they run properly on the computer system.
Most computers have one CPU that can only perform one task at a time so the OS allocates the CPU time between different programs based on time and priority of the software application.
Security
OS prevents unauthorized access.
* It ensures security of the system through usernames and passwords
* Protects files from other users reading or writing files
* Anything a user does (read, write, delete files, change settings) is recorded to discover unauthorized users and activities
Word processors
A software application that is used for composing, editing, formatting and printing of documents. Ex: Microsoft Word
Spreadsheets
A software application used for organization and analysis of data.
Data is represented as cells, arranged in rows and columns. These cells contain numbers, text, or the result of formulas that calculate and display values based on contents of other cells. Ex: Microsoft Excel
Database management systems
A software application that manages databases and is designed to provide a user interface to the databases. Ex: Microsoft Access.
Database = collection of data
Field = column in a database
Record = row in a database representing a set of related data, ex: student information (name, ID, date of birth etc)
Unique key = one (or more) specific fields that uniquely identify each record, ex: Student ID since all the students in the school do not have similar ID and is uniquely identified
Web browsers
A software application used to access, retrieve and present content on the World Wide Web (WWW). Content can be identified by a URI (Uniform Resource Identifier) and includes web pages, images, videos, or other files. Ex: chrome, firefox, Internet explorer. Ex of URI (same as URL): http://en.wikipedia.org/
A computer program used to access and manage a user’s email. It can be web-based like Gmail or installed on the user’s computer like Microsoft Outlook.
Computer Aided Design (CAD)
programs that use computer systems to assist in the creation, modification, analysis or optimization of a design; e.g. CADdoctor
Graphic processing software
program or collection of programs that enable a person to manipulate visual images on a computer; adobe photoshop
AND Logic Gate
Multiply the inputs;
0 0 = 0
0 1 = 0
1 0 = 0
1 1 = 1
NAND Logic Gate
an AND gate with the circle of a NOT gate at the output; opposite of AND;
0 0 = 1
0 1 = 1
1 0 = 1
1 1 = 0
OR Logic Gate
Add inputs;
0 0 = 0
0 1 = 1
1 0 = 1
1 1 = 1
XOR Logic Gate
same like OR but gives opposite result if both inputs are true;
0 0 = 0
0 1 = 1
1 0 = 1
1 1 = 0
NOT Logic Gate
opposite of inputs;
0 = 1
1 = 0
NOR Logic Gate
a combination OR gate followed by an inverter; opposite of OR;
0 0 = 1
0 1 = 0
1 0 = 0
1 1 = 0
Convert D7 Hexadecimal to Binary
D
[8 4 2 1]
-> [1 1 0 1]
7
[8 4 2 1]
-> [0 1 1 1]
Convert 10110111 Binary to Hexadecimal
[8 4 2 1]
[1 0 1 1] = 11 = B
[8 4 2 1]
[0 1 1 1] = 7
Answer: B7
Fill in this Hexadecimal to Binary table:
A
B
C
D
E
F
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15
Find -58 in Binary by 2 complement form!
Find + 58 first:
[128 64 32 16 8 4 2 1]
[0 0 1 1 1 0 1 0]
Start inverting from after the first 1 digit:
[0 0 1 1 1 0 *1 0]
[1 1 0 0 0 1 1 0] -> THIS IS THE ANSWER.
Convert 4.5 into Binary using the Binary fraction table!
[8 4 2 1 * 0.5 0.25 0.125 0.0625]
[0 1 0 0 * 1 0 0 0]
Convert -2.75 into Binary using the Binary Fraction table!
First find + 2.75:
[8 4 2 1 * 0.5 0.25 0.125 0.0625]
[0 0 1 0 * 1 1 0 0]
Now flip all digits from the first 1 binary number:
[0 0 1 0 1 * 1 0 0]
[1 1 0 1 0 . 1 0 0]
Explain how corrupted data files can be recovered
Corrupted data files can be recovered through file recovery softwares. These softwares are used to recover lost files through special features which help piece files back together and restore it back to its original form. Another way is to ensure that copies of the original data are stored in a separate secondary storage medium, away from the main computer system, so that they will be able to retrieve the copies back when they need to.