Computer Fundamentals and Programming
Computer Fundamentals and Programming
I. THEORY
Computer – is a fast electronic calculating machine that accepts input information, processes it
according to a list of internally stored instructions called programs, and produces the resultant output
information.
Computer system – is the physical equipment and instructions, i.e. hardware and software, used as a
unit to process data.
Classification of Computers:
A. According to function
1. General purpose computer – these machines have the capability of dealing with a
variety of different problems, and are able to act in response to programs created to meet
different needs
2. Special purpose computer – are these machines that are designed to perform one
specific task.
B. According to type
1. Analog computer – are used for scientific, engineering, and process-control purposes.
2. Digital computer – is a machine that specializes in counting.
3. Hybrid computer – combination of analog and digital computer.
C. According to size
1. Microcomputer – are small, single-user computers without extensive peripherals and
storage. The most common microcomputer is the PC.
2. Minicomputer – these are larger computers used in business data processing at a single
location.
3. Mainframe computer – are general-purpose computers used in large and centralized
applications in which several programs are running simultaneously.
4. Supercomputer – are extremely powerful computers that have specific functions, such
as engineering design, analysis, etc.
D. By generations
1. 1st generation (1945 – 1956) – employs vacuum tubes an vale technology and gad the
main limitations of heavy power consumption and very little reliability.
• ABC (Atanasoff-Berry Computer) – first electronic computer.
• Colossus – a special-purpose computer used to crack German code for the
British code contains 1,500 thermionic valves.
• ENIAC (Electronic Numerical Integrator and Calculator) – it is regarded
as the prototype of all later computer equipment.
• EDVAC (Electronic Discrete Variable Automatic Calculator) – ii is the
first computer to contain memory to hold both stored program and data.
• UNIVAC (Universal Automatic Computer) – the first commercial
computer.
1
Asian Power Systems Review Center
2. 2nd generation (1959 – 1965) – smaller in size. Computers were introduced doe to the
introduction of transistors. Computers during this time were faster, more reliable, and
more energy efficient.
3. 3rd generation (1966 – 1970) – Integrated semiconductor chip was introduced and was
also characterized by the use of operating system.
4. 4th generation (1970 – present) – VLSI and ULSI were made available, mainframe
computers were introduced; and local as well as global linking of computers were made
available.
b. RAM (Random Access Memory) – a memory which can be read and written
any number of times, but its contents are lost when the power is turned off.
Classification of RAM:
1. Static RAM – uses flip-flops to store the state of digits so that data is
maintained until the power is turned off.
2. Dynamic RAM – utilizes the gate capacitance of MOS transistors to
maintain the states of each digit.
Buffer – is a storage which is used to store data temporarily while it is being transferred.
2
Asian Power Systems Review Center
Printer – is an output device which writes output data (such as letters and graphics) on
paper to produce hard copies.
Types of printer:
1. Impact printers – are devices which print characters and so forth by some
mechanical method. Examples are dot matrix printer and raised character printer.
2. Non-impact printers – are devices which print characters using thermal or chemical
printing process. Examples are ink jet printers and laser printers.
Types of software:
1. System software – DOS, Windows, Unix, etc
2. Application software – Wordstar, Payroll program, MS Office, etc.
Programming Languages
Programming – is the process of preparing sequences of instructions for control of a computer’s
operation.
3
Asian Power Systems Review Center
Special Binary Coding – is when the decimal number is represented by its equivalent binary
number.
2. Excess-3 Code – a code that perform in the same manner as BCD except that 3 is added to each
decimal digit before encoding it in binary.
3. Gray Code – a code that belongs to a class of code called minimum-change codes, in which only
one bit in the code group changes when going from one step to the next. In going from any one
decimal number to the next, only one bit of the Gray code changes.
4
Asian Power Systems Review Center
10 1010 1111
11 1011 1110
12 1100 1010
13 1101 1011
14 1110 1001
15 1111 1000
Alphanumeric Code – is a binary code of group of elements consisting of the ten decimal digits, the
26 letters of the alphabet and certain number of special symbols such as dollar sign, etc.
Complementation of a Number
1. Radix-Minus-One Complement – a memory code wherein each digit of a decimal number is
converted into its binary equivalent rather than converting the entire decimal value into a pure
binary form.
2. True Complement or Radix Complement – can be obtained by adding 1 to the radix-minus
one complement of the number.
Boolean algebra
Boolean algebra – it is an algebra of logic that uses variables with only two, possible values.
5
Asian Power Systems Review Center
6
Asian Power Systems Review Center
23. Add (23) base 10 to (45) base 8. Express the answer in decimal.
a. 60 b. 68 c. 65 d. 59
24. Add (10111) base 2 to (12A) base 16. Express the answer in base 10.
a. 316 b. 268 c. 625 d. 321
7
Asian Power Systems Review Center
27. If (ABC) base 16 is added to (123) base 8, what is the sum expressed in base 8?
a. 5417 b. 5536 c. 5521 d. 5345
28. Add (10011) base 2 to (25) base 8. Express the answer in base 16.
a. 54 b. 28 c. 24 d. 34
29. Subtract (1010) base 2 from (20) base 8. Express the answer in decimal.
a. 5 b. 6 c. 7 d. 4
31. What is the difference if (255) base 8 is subtracted from (10101111) base 2? Express the answer
in base 2.
a. 110 b. 100 c. 010 d. 001
34. Find the product of (F10) base 16 and (101) base 2. Express the answer in base 10.
a. 19990 b. 19280 c. 19850 d. 19200
35. Find the product of (213) base 8 and (10) base 10. Express the answer in base 16.
a. 5C0 b. 4E9 c. D98 d. 56E
38. Multiply (12) base 8 and (111) base 2. Express the answer in base 16.
a. 46 b. 5A c. 4C d. 54
40. Divide (120) base 10 by (14) base 8. Express the answer in base 2.
a. 1010 b. 1011 c. 1001 d. 1100
41. Divide (15) base 16 by (011) base 2. Express the answer in base 10.
a. 5 b. 4 c. 6 d. 7
42. Divide (1111) base 2 by (101) base 2. Express the answer in base 2.
a. 011 b. 010 c. 001 d. 100
43. Divide (1111) base 2 by (100) base 2. Express the answer in base 10.
a. 11.101 b. 11.110 c. 11.011 d. 11.010
8
Asian Power Systems Review Center
44. Decimal number 5436 when converted to 9’s compliment will become
a. 4555 b. 4356 c. 4563 d. 4653
49. What is the radix minus one complement of (BABE) base 16?
a. 4521 b. 4541 c. 4522 d. 4542
III. SELF-TEST
1. Most of the inexpensive personal computers do not have any disk or diskette drive. What is the
name of such computers?
a. Home computers c. Dedicated computers
b. Diskless computers d. General-purpose computer
2. What type of memory the computer utilizes first during data processing?
a. Hard disk memory c. Floppy disk
b. ROM d. Cache memory
5. Select the factor which would strongly influence a business person to adopt a computer.
a. Accuracy b. Reliability c. Speed d. All of the above
9
Asian Power Systems Review Center
10. Select the nickname of the computer used by the Americans in 1952 for their H-bomb project.
a. ENIAC b. EDSAC c. MANIAC d. UNIVAC
12. Which of the following devices allows user to add components and capabilities to a computer
system?
a. Keyboards b. System boards c. Diskettes d. Expansion slots
13. Most of the inexpensive personal computers do not have a disk or diskette drive. What is the
name of such computers?
a. home computers c. diskless computers
b. dedicated computers d. general purpose computers
14. Where does a computer add, compare and shuffle its data?
a. Memory chip b. Floppy disk c. CPU chip d. Hard disk
15. The pieces of equipment that are attached to the CPU of computer and which it can access are
known as:
a. Output devices b. Peripherals c. Control units d. ALU
10
Asian Power Systems Review Center
23. Select the one that did not become popular during the fourth generation computers.
a. CRT terminals c. semi-conductors
b. Mini-computers d. personal computers
25. The first mechanical computer designed by Charles Babbage was known as
a. Analytical engine c. Abacus
b. Calculator d. Processor
26. Which of the following can read data and convert them to a form that a computer can use?
a. Logic b. Control c. Storage d. Input devices
28. Which of the following pieces of hardware is used the most in the input phase of a computer-
based information system?
a. Printer b. Diskette c. Computer programs d. Keyboard
29. List of detailed instructions that direct a computer is called which one of the following?
a. Logic b. Memory c. Storage d. Program
34. An IC is ____.
a. a complicated circuit c. an integrating device
b. much costlier than a single transistor d. fabricated on a tiny silicon chip
11
Asian Power Systems Review Center
36. The physical equipment made up of various metals, silicon and plastic component that make up
the parts of a computer is known as
a. Micro b. Peripherals c. Hardware d. Disc drive
39. Which was the first electronic computer that belonged to the first generation computer?
a. Mark 1 c. Attanasoff-Berry Computer
b. ENIAC d. UNIVAC - 1
40. Select the one that was not associated with second-generation computers.
a. high procedural language c. operating system
b. transistor d. all of the above
43. How many different binary numbers can be stored in a register consisting of six switches?
a. 16 b. 64 c. 32 d. 128
46. Which of the following is generally used where lowest power consumption is essential?
a. CMOS b. PMOS c. NMOS d. Any of these
47. Which of the following logic gate is similar to the function of two parallel switches?
a. AND b. OR c. NAND d. NOR
48. In PASCAL, free identifier occurrences are bound in the environment of the abstract. This is
called
a. Static binding c. Auxiliary binding
b. Secondary binding d. Dynamic binding
49. In PASCAL, actual parameters are always evaluated ____ the procedure is invoked.
a. After b. With c. Before d. Simultaneously With
12
Asian Power Systems Review Center
51. Which of the following is not a HIGH LEVEL computer programming language?
a. FORTRAN b. COBOL c. MODEM d. ALGOL
59. For the following decimal numbers, 9’s complement is given. Point out the incorrect relation.
Decimal 1’s Complement Decimal 1’s Complement
a. 5436 4652 c. 45.15 54.84
b. 1932 8067 d. 18.293 61.706
61. How many different BCD numbers can be stored in a register containing 12 switches can using an
8, 4, 2, 1 code?
a. 99 b. 100 c. 999 d. 1000
62. Decimal number 5436 when converted to 9’s complement will become
a. 4356 b. 4653 c. 4563 d. 4655
63. Which of the following binary numbers is equal to octal number 66.3?
a. 101110.100 b. 111111.111 c. 100111.111 d. 110110.011
64. Which of the following octal number is equal to the decimal number 545.375?
a. 5000 b. 1640 c. 1041.3 d. 1170.7
13
Asian Power Systems Review Center
66. If each address represents one byte of storage space, how many address lines are required to
access RAM chips arranged in a 4 x 6 array, where each chip is 8K x 4 bits?
a. 13 b. 15 c. 16 d. 17
71. In BASIC which of the following GOTO statement is NOT correctly written?
a. 10 GOTO 50 b. 110 GOTO N c. 70 GOTO 35 d. None of these
72. Which of the following BASIC string has not been correctly written?
a. TWENTY SEVEN c. SYMBOL IS ‘X’
b. 2 + 7 = 9 d. 84.56
14