CS 105 Review Questions #3

Similar documents
User. Application program. Interfaces. Operating system. Hardware

Dec Hex Bin ORG ; ZERO. Introduction To Computing

CC411: Introduction To Microprocessors

An Overview of the Computer System. Kafui A. Prebbie 24

Machine Architecture and Number Systems CMSC104. Von Neumann Machine. Major Computer Components. Schematic Diagram of a Computer. First Computer?

Machine Architecture and Number Systems

Computer Organization

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

What is the typical configuration of a computer sold today? 1-1

CMSC 104 -Lecture 2 John Y. Park, adapted by C Grasso

Digital Systems. John SUM Institute of Technology Management National Chung Hsing University Taichung, ROC. December 6, 2012

Chapter One. Introduction to Computer System

Microprocessors I MICROCOMPUTERS AND MICROPROCESSORS

Discussion. Why do we use Base 10?

1.1 Bits and Bit Patterns. Boolean Operations. Figure 2.1 CPU and main memory connected via a bus. CS11102 Introduction to Computer Science

Information Communications Technology (CE-ICT) 6 th Class

Introduction to Computers. Joslyn A. Smith

IB Computer Science Topic.2-

Arab Open University. Computer Organization and Architecture - T103

Information Science 1

Computers in Engineering COMP 208. A Brief History. Mechanical Calculators. A Historic Perspective Michael A. Hawker

Computers in Engineering COMP 208

Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall

Fundamental concepts of Information Technology

Bits and Bit Patterns

Electricity: Voltage. Gate: A signal enters the gate at a certain voltage. The gate performs operations on it, and sends it out was a new signal.

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

TNBEDCSVIP.IN. S.No CONTEND Page No 1. NUMBER SYSTEM AND BASE CONVERSIONS TYPES OF NUMBER SYSTEM 1. Binary Number System:

Experimental Methods I

COSC 122 Computer Fluency. Computer Organization. Dr. Ramon Lawrence University of British Columbia Okanagan

Elements of Computers and Programming Dr. William C. Bulko. What is a Computer?

Lab Determining Data Storage Capacity

Using sticks to count was a great idea for its time. And using symbols instead of real sticks was much better.

Computer Systems. Binary Representation. Binary Representation. Logical Computation: Boolean Algebra

Intermediate Programming & Design (C++) Notation

Angel International School - Manipay 1 st Term Examination November, 2015 ICT

ECS15, Lecture 10. Goals of this course 2/8/13. Mini-Review & Topic 3.2 Software. Today s agenda

5 Computer Organization

Computer is an electronic machine that can receive, store, transform and output data of all kinds (image, text, numeric, graphics and sound).

Computer Training for Newcomers

Year 10 OCR GCSE Computer Science (9-1)

Digital Logic Design Exercises. Assignment 1

Computer Organization and Programming

The LC3's micro-coded controller ("useq") is nothing more than a finite-state machine (FSM). It has these inputs:

A Review of Chapter 5 and. CSc 2010 Spring 2012 Instructor: Qian Hu

Computer Systems Architecture

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

Chapter 1. Data Storage Pearson Addison-Wesley. All rights reserved

Chapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction

Show how to connect three Full Adders to implement a 3-bit ripple-carry adder

National 5 Computing Science Software Design & Development

COLLEGEDUNIA MCA. 3. What would be displayed, if the following program is compiled and run?

COMPUTER SYSTEM. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U

Memory Overview. Overview - Memory Types 2/17/16. Curtis Nelson Walla Walla University

ZONAL EDUCATION OFFICE - JAFFNA

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

COMS 1003 Fall Introduction to Computer Programming in C. History & Computer Organization. September 15 th

Data Storage. Slides derived from those available on the web site of the book: Computer Science: An Overview, 11 th Edition, by J.

For the A+ Certification exams, you should be able to identify the names, functions, and characteristics of the major components and ports of a Pc.

Computer Organization

Fundamentals of Python: First Programs. Chapter 1: Introduction Modifications by Mr. Dave Clausen

Chapter 1 Computer and Programming. By Zerihun Alemayehu

Computer Organization

2011 Francisco Delgadillo

MEHRAN UNIVERSITY OF ENGINEERING AND TECHNOLOGY, JAMSHORO. FIRST TERM FIRST YEAR (1 ST TERM) B.E.(ELECTRICAL) REGULAR EXAMINATION 2009 OF 09-BATCH.

Von Neumann Architecture

Computers Programming Introduction. Iulian Năstac

Introduction to Computer Science. What is Computer Science?

INTRODUCTION TO COMPUTERS

CDS130 Mid-term exam: Sample

INFS 214: Introduction to Computing

Zimmer CSCI /24/18. CHAPTER 1 Overview. COMPUTER Programmable devices that can store, retrieve, and process data.

Unit - II. Computer Concepts and C Programming 06CCP13. Unit II

Components of a Computer System

5 Computer Organization

(Refer Slide Time 00:01:09)

1. This memory is for short term storage and is lost when the computer is turned off. A. Icon B. CPU C. Hard drive D. RAM 2. This input device will

Computer Organization

MICROPROCESSOR MCQs. 1) What does the microprocessor comprise of? a. Register section b. One or more ALU c. Control unit d.

Overview of a computer

Software and Hardware

Introduction To Computer Hardware. Hafijur Rahman

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

Computer Fundamentals

History of Modern Computing Lesson 1

IBPS Practice Exam 1. One megabyte equals approximately 1) 1,000 bits 2) 1,000 bytes 3) 1 million bytes 4) 1 million bits 5) 2,000 bytes 2.

Chapter 1: Why Program? Computers and Programming. Why Program?

! Learn how to think like a computer scientist. ! Learn problem solving. ! Read and write code. ! Understand object oriented programming

COURSE OUTLINE & WEEK WISE BREAKAGE

Introduction to computers

LECTURE SCHEDULE 2. Units of Memory, Hardware, Software and Classification of Computers

Worksheet - Storing Data

1.The First Instrument known in the history of computers was. a) Pascal s adding machine b) Napier s bones c) Abacus d) Analytical Engine

Computer Architecture Dr. Charles Kim Howard University

Question Bank. Fundamentals Of Computer FYBCA (SEM - I)

Computer Architecture and Assembly Language. Spring

Chapter 1. Introducing the Universal Machine

Final Labs and Tutors

Downloaded From :

BSNL TTA Question Paper-Computers Specialization 2007

Transcription:

1 CS 105 Review Questions #3 These review questions only include topics since our second test. To study for the final, please look at the first two review documents as well. Almost all of these questions are actual exam questions from the past. Besides the review questions, also study the labs and notes in the course. Good luck! 1. For several decades, there has been a rule of thumb that the newest computer hardware technology is about 50% faster than that of the previous year. This law is named after which computer scientist? a. John Backus b. Gordon Moore c. Claude Shannon d. William Shockley e. Alan Turing f. John von Neumann 2. The person who came up with the ideas of the instruction execute cycle and the stored program concept was. a. Claude Shannon b. Charles Babbage c. Alan Turing d. Konrad Zuse e. John von Neumann f. Herman Hollerith 3. Suppose x and y are binary values used as input to a digital circuit. First, the value of x is fed to a NOT gate to produce x. Then, x and y are combined in an XOR gate to produce output z. If z is 1, what can we assume about the original values x and y? a. x and y are the same value b. x and y are different values c. x = 1 d. y = 1 e. x = 0 f. y = 0 4. Suppose an XOR gate has two inputs x and y and an output z. If x = 1 and z = 1, is it possible for us to determine the value of y? If so, what is it? a. Practice this question with other logic gates, and other values of x and z.

2 5. Suppose the values x = 1 and y = 0 are to be fed simultaneously into 4 logic gates: an AND gate, an OR gate, an XOR gate and a NOR gate. What is the output from each gate? AND = OR = XOR = NOR = 6. In the circuit drawing, assume that the outputs from all the gates are 1. What are the input values w, x, y and z? Fill in the blanks (and indicate if any of these values cannot be determined). w = x = y = z = 7. Consider the following digital circuit. x y What is the output of this circuit if x = 1 and y = 1? What is the output of this circuit if x = 1 and y = 0?

3 8. Suppose binary values X, Y and Z are the inputs into logic gates as follows. X and Y are inputs to an AND gate, and the result is 1. Y and Z are inputs to an XOR gate and the result is 0. What are the values of X, Y and Z? 9. Suppose the binary values x and y are going to be used as input into both an XOR gate and an AND gate. Can the output of these two gates be the same? Explain. 10. Consider a NAND gate with two inputs x and y and an output z. If x = y, then what can we conclude about z? 11. What are the two outputs of a binary adder circuit? a. Sum and difference b. Carry in and carry out c. Sum and carry d. Sign and magnitude e. Sum and sign 12. In the von Neumann computer model, what are the three tasks that must be performed on each instruction in a program? List them in the order they occur, and explain why each step is necessary. 13. Let s look at units of memory size. a. How many kilobytes are in a gigabyte? b. A terabyte equals 2 n bytes of data. What is n? c. How many megabytes are there in 2 25 bytes? 14. The two key parts of a computer s memory system are its RAM and hard disk. a. Which typically has a larger capacity, RAM or the hard disk? b. Which is faster to access information, RAM or the hard disk? c. Give an example of information that would be in RAM, but not on the hard disk. d. Give an example of information that would be on the hard disk, but not in RAM.

4 15. Which of the following types of memory has the fastest access times? a. hard disk b. CD-RW c. RAM d. Magnetic tape e. floppy disk 16. Terminology regarding various data transfers: a. Suppose you just opened Access, and you want to open a database file for editing. To open this file, what data transfer is taking place in the computer s memory? We say that the file is being copied from to. b. Suppose you are working in Excel, and after making some significant modifications, you save the spreadsheet file. When you save, data is being copied from to. c. When files are being backed up, typically they are being copied from to. d. When we load a value into a register, the value is being copied from to. 17. Which is/are true about RAM, in general? a. It has a smaller capacity than the hard drive. b. It requires a constant supply of electricity to maintain data. c. It contains the registers that the CPU uses to perform operations. d. two of the above e. all of the above f. none of the above 18. Which of the following is true about a computer s hard drive, in general? a. It has a larger capacity than RAM. b. It requires a constant supply of electricity to maintain data. c. It is an example of direct access memory. d. two of the above e. all of the above f. none of the above 19. In parts (a) through (d), classify each of the following types of memory as main or secondary. Then, answer the questions in parts (e) and (f): a. disk b. RAM

5 c. tape d. cache e. Of the 4 types of memory given in above, which is the most expensive (per KB or per MB)? f. Which has the fastest to access data? 20. Give two reasons why we should not use RAM for all of our computer memory, even if the amount of RAM is more than we will ever need. 21. Which of the following is not an example of secondary memory? a. CD b. floppy disk c. magnetic tape d. DVD e. super disk f. random access memory 22. What is the result of each of the following bit-manipulation operations on an 8-bit register? a. Starting with 00111000, a right shift of 4 bits b. Starting with 00111000, a left rotate of 3 bits 23. Suppose that a register contains an 8-bit value. Describe the bitwise logical operation that needs to be performed in the following cases. a. Invert the middle 4 bits b. Set the rightmost 3 bits to 0 c. Set the first 2 bits to 1 24. In a 16-bit instruction, the first 4 bits of an instruction are its opcode. The opcode value 2 means the instruction will put a constant value in a register. Its general format is 2RXX where R is the 4-bit register number, and XX is the 8-bit signed value to put in the register. Write the binary or hexadecimal instruction that will set register number twelve to the number 5.

6 25. Here is an instruction set for a simple computer. Assume that there are 16 8-bit registers, and the size of RAM is 256 bytes. Instructions are 16 bits long. Opcode Hex format Meaning 1 1RXY Load register R with the value contained in memory at hex address XY. 2 2RXY Load the hexadecimal number XY into register R. 3 3RXY Store the value from register R into memory at address XY. 5 5XYZ Add the values in registers Y and Z and put the result in register X. Suppose we wanted to write machine code that adds the contents of bytes 1 and 2 in memory and then puts the result in byte 3. Write the machine code instructions that will accomplish this. 26. Some programming languages are machine dependent, while others are machine independent. a. What does it mean for a programming language to be machine dependent? b. When designing software, which type of language is generally preferred, a machine dependent or machine independent one? Why? c. Give one example of each type of language. 27. Identify the type of programming language being described: a. instructions can only perform one operation, and they have very short names (often 3 letters long); their operands are often the names of registers b. instructions are written as hexadecimal or binary numbers c. statements can use various English words and ordinary mathematical operators, and the hierarchical structure of the program is evident by the indentation 28. The purpose of a compiler is to translate a(n) from to.

7 29. A program (executable file) that is created to run on an IBM PC will not run on an Apple Macintosh mainly because the Macintosh: a. does not have as much memory b. has a different hard disk configuration c. does not use ASCII code to represent characters d. uses a different machine language e. uses a different keyboard and mouse f. none of the above 30. Consider the statement y = x * 21. Show how a compiler should translate this statement into assembly code in order to save CPU time avoiding a multiply instruction. (Hint: use shift and add instructions.) Assume that register r1 stands for x and r2 stands for y. You may use other registers r3, r4, r5, as you wish for temporary results.