SECONDARY SCHOOL, L-IMRIEĦEL HALF YEARLY EXAMINATIONS 2016/2017

Similar documents
GIRLS SECONDARY, L-IMRIEĦEL HALF YEARLY EXAMINATIONS 2015/2016

KULLEĠĠ SAN BENEDITTU Secondary School, Kirkop

FORM 4 (Option) COMPUTING TIME: 1 hr 30 min

N.B. These pastpapers may rely on the knowledge gained from the previous chapters.

FORM 5 COMPUTING TIME: 1h 45min

Chapter 6 Primitive types

Memory General R0 Registers R1 R2. Input Register 1. Input Register 2. Program Counter. Instruction Register

ST.FRANCIS SECONDARY SCHOOL SLIEMA HALF YEARLY EXAMINATIONS SPECIMEN PAPER. SENIOR 3 COMPUTER STUDIES TIME: 2 hours

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

YEAR 11 COMPUTING TIME: 1h 45min. Marking Scheme

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

EXAMINATION FOR THE BSC (HONS) INFORMATION SYSTEMS; BSC (HONS) INFORMATION TECHNOLOGY & BSC (HONS) COMPUTER SCIENCE; YEAR 1

HALF-YEARLY EXAMINATIONS FEBRUARY Subject: Computing Form: 4 Time: 1 ½ hours MARKING SCHEME

Cambridge International Examinations Cambridge Ordinary Level

Von Neumann Architecture

UNIVERSITY OF MALTA THE MATRICULATION CERTIFICATE EXAMINATION INTERMEDIATE LEVEL COMPUTING. May 2012 MARKING SCHEME

JAVA OPERATORS GENERAL

Expressions and Data Types CSC 121 Spring 2015 Howard Rosenthal

IB Computer Science Topic.2-

Getting started with Java

McGill University School of Computer Science COMP-202A Introduction to Computing 1

Outcomes. Lecture 13 - Introduction to the Central Processing Unit (CPU) Central Processing UNIT (CPU) or Processor

Operators in java Operator operands.

HALF-YEARLY EXAMINATIONS FEBRUARY

Exam 1. CSC 121 Spring Lecturer: Howard Rosenthal. March 1, 2017

University of Cape Town ~ Department of Computer Science Computer Science 1015F ~ June Exam

Lecture1: introduction. Outline: History overview Central processing unite Register set Special purpose address registers Datapath Control unit

ASSIGNMENT ECE514 (COMPUTER ORGANIZATION) ASSIGNMENT NO. 3

COMP Primitive and Class Types. Yi Hong May 14, 2015

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

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

JAVA Programming Fundamentals

Information Science 1

Section 2.2 Your First Program in Java: Printing a Line of Text

15110 PRINCIPLES OF COMPUTING SAMPLE EXAM 2

CMPUT 101 with Solutions Quiz 2 (50 minutes) November 7, 2003

FACTFILE: GCE DIGITAL TECHNOLOGY

Basic operators, Arithmetic, Relational, Bitwise, Logical, Assignment, Conditional operators. JAVA Standard Edition

Expressions and Data Types CSC 121 Fall 2015 Howard Rosenthal

(a) What is the denary equivalent of the hexadecimal number A7?

Student Number: UTORid: Question 0. [1 mark] Read and follow all instructions on this page, and fill in all fields.

Zheng-Liang Lu Java Programming 45 / 79

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University

Topics. Chapter 5. Equality Operators

CS16 Exam #1 7/17/ Minutes 100 Points total

Java Foundations: Introduction to Program Design & Data Structures, 4e John Lewis, Peter DePasquale, Joseph Chase Test Bank: Chapter 2

Basic Arithmetic (adding and subtracting)

Chapter 3: Operators, Expressions and Type Conversion

Hardware: Logical View

Chapter 1. Introduction to Computers and Programming. M hiwa ahmad aziz

Cambridge International Examinations Cambridge International Advanced Subsidiary and Advanced Level

4 Programming Fundamentals. Introduction to Programming 1 1

General purpose registers These are memory units within the CPU designed to hold temporary data.

MRIEHEL SECONDARY SCHOOL HALF-YEARLY EXAMINATIONS 2016~17. Year 9 Computing Time: 1hr 30mins

Java Notes. 10th ICSE. Saravanan Ganesh

CMPUT 101 with Solutions Quiz 2 (50 minutes) November 16, 2000

I Internal Examination Sept Class: - BCA I Subject: - Principles of Programming Lang. (BCA 104) MM: 40 Set: A Time: 1 ½ Hrs.

Java provides a rich set of operators to manipulate variables. We can divide all the Java operators into the following groups:

Diskrečioji matematika

Level 2: The Hardware World Chapters 4 and 5 (topics of other cs courses)

Computer Architecture 2/26/01 Lecture #

Program Fundamentals

Important Java terminology

Data Types. Numeric Data Types

Possible Exam Questions

Programming with Java

BASIC COMPUTER ORGANIZATION. Operating System Concepts 8 th Edition

CSE 201 JAVA PROGRAMMING I. Copyright 2016 by Smart Coding School

Information Science 1

A B C ((NOT A) AND B) OR C

Register Transfer and Micro-operations

Java provides a rich set of operators to manipulate variables. We can divide all the Java operators into the following groups:

Test 1. CSC 121 Lecture Lecturer: Howard Rosenthal. March 4, 2014

2. (a) Compare the characteristics of a floppy disk and a hard disk. (b) Discuss in detail memory interleaving. [8+7]

PROGRAMMING FUNDAMENTALS

SISTEMI EMBEDDED. Basic Concepts about Computers. Federico Baronti Last version:

Prof. Navrati Saxena TA: Rochak Sachan

Computer Organisation CS303

Lecture Set 4: More About Methods and More About Operators

Conditional Programming

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

ESc101 : Fundamental of Computing

Chapter One. Introduction to Computer System

CPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system.

ECE 375 Computer Organization and Assembly Language Programming Winter 2018 Solution Set #2

Full file at

1. An operation in which an overall value is computed incrementally, often using a loop.

Teaching London Computing

Section 2.2 Your First Program in Java: Printing a Line of Text

Exam 2. Programming I (CPCS 202) Instructor: M. G. Abbas Malik. Total Marks: 40 Obtained Marks:

Cambridge International Examinations Cambridge International Advanced Subsidiary and Advanced Level

Basic Von Neumann Designs

Chapter 05: Basic Processing Units Control Unit Design. Lesson 15: Microinstructions

Groups of two-state devices are used to represent data in a computer. In general, we say the states are either: high/low, on/off, 1/0,...

Sample Exam I PAC II ANSWERS

Computer Architecture

CS113: Lecture 3. Topics: Variables. Data types. Arithmetic and Bitwise Operators. Order of Evaluation

Chapter 4: Control Structures I

Course Outline. Introduction to java

Values and Variables 1 / 30

Transcription:

SECONDARY SCHOOL, L-IMRIEĦEL HALF YEARLY EXAMINATIONS 2016/2017 YEAR: 10 Computing Time: 1½ Hr. Name: Class: Instructions: 1. Answer all the questions in the space provided on this paper. 2. Calculators cannot be used for this exam. 3. Write neatly and clearly using a blue or black pen. Avoid the excessive use of correcting fluid. 4. You have 1½ hours to finish off this examination paper; use your time well allowing time for revision. 5. Do not staple the papers together. Good luck! Page 1 of 12

ANSWER ALL QUESTIONS. 1. Computers represent values in binary. a) Why is the above statement true? b) Convert the following unsigned binary number to decimal: 11001011 c) Add these two binary numbers together: 01101001 + 10111000 d) Using 8-bit 2 s Complement, calculate 90 50. Show all your working. (5 marks) Page 2 of 12

2. This question is about the range of numbers that can be represented in an 8-bit register. a) What is the largest unsigned binary number that can be represented in an 8-bit register? b) What is the range of unsigned decimal numbers that can be represented in an 8-bit register? c) The smallest 2 s complement number that can be represented in n bits is given by the formula: -2 n-1 Use the formula to find the smallest 2 s complement decimal number that can be represented in an 8-bit register. d) Explain why the largest decimal number using 8 bit register in 2 s complement is 127 and not 128. 3. An 8-bit register contains the value 00111100. a) What can be done to the bits in this register to quickly divide (by 2) the value of the number? Page 3 of 12

b) Show the working how this is done and how it is stored in an 8-bit register. c) Can this Hex number AB be stored in a 4-bit register? What happens when this occurs? 4. Match column A with column B to represent the correct Boolean expression with its meaning. Column A Column B a) A + B A AND B b) A A OR B c) A. B NOT A (3marks) 5. Give the Boolean expression and the truth table for the following logic circuit. A D B Z C E Boolean expression: Page 4 of 12 (3 marks)

Truth table: 6. Draw the logic circuit for the following Boolean expression: (3 marks) Z = (A.B). (A+B) (4 marks) Page 5 of 12

7. Give the Boolean expression for the following truth table: A B X 0 0 0 0 1 0 1 0 1 1 1 1 (3 marks) 8. This question is related to the Java programming language. a) Fill in and match the following data types with their respective characteristics: byte short char float boolean String Can hold an address. Characteristics Data type Can represent numbers between -128 and 127 Can hold a single letter. Can represent numbers between -32,768 and 32,767. Can only represent true or false. Can store a number with a decimal point. (6 marks) Page 6 of 12

9. Look carefully at the program used by a class teacher to keep record of the results of her 10 students. Then answer the following questions. class Results { public static void main (String args[]) { int mark; int fails = 0; int passes = 0; for ( int i = 0; i<=10; i++) { System.out.print ("Enter the mark of next student: "); mark = Keyboard.readInt(); if (mark < 50) fails++; else passes++; } System.out.println ( fails + " students failed \n" + passes + " students passed"); } } a) From the program shown, identify: i. A primitive variable: ii. An escape character: iii. An assignment statement: iv. An input statement: v. A JAVA reserved word: vi. A loop: vii. A conditional statement: (7 marks) b) Comments are very useful when coding. Mark with an * in the above program where a line of comment can be inserted. Write the comment below by applying the right formatting. (3 marks) Page 7 of 12

c) Identify THREE types of errors that can occur in a program. (3 marks) d) Which one of the errors mentioned in (c) occurs if: i. This statement is written to add two variables int sum=num1*num2; ii. If a semicolon is missing in one of the statements 10. Study the flowchart below and complete the Java program which reflects this flowchart. Start Read age age > 16 Yes Print You can vote No Print You cannot vote End Page 8 of 12

// class { static void main (String args[]){ System.out.print("How old are you? "); byte age= Keyboard.readByte(); if System.out.println("You can vote!"); System.out.println("You cannot vote!"); } } (5 marks) 11. The diagram below shows the main units of a CPU. a) Label the diagram by using three words from the list below: Main Memory Input Device CU ALU Output Device (3 marks) b) A register is a location in the CPU which holds data or instructions temporarily. i. Name the TWO registers found in the Control Unit. Page 9 of 12

ii. Name the TWO registers found in the Arithmetic Logic Unit. c) Choose any TWO registers that you have mentioned either from questions bi or bii, and explain their use. Name of Register: Its use: Name of Register: Its use: (4 marks) d) State whether the following statements are TRUE or FALSE. TRUE/FALSE i. The width of the address bus determines the address space. ii. The read/write line is found in the data bus. iii. The address of the storage location, travels along the address bus. iv. The processor speed is measured in Gb. v. The wider the data bus the more data can travel to and from the main memory. vi. The speed of the CPU may depend on the wordlength and cache memory amongst others. Page 10 of 12

vii. The Memory Address Register (MAR) holds the result of a current calculation. viii. The Memory Data Register (MDR) temporarily holds data/instruction, which is read from or written to memory. (8marks) 12. The Instruction Set is a set of instructions that the CU can understand. Each instruction is made up of an opcode and an operand. Explain what is an opcode and an operand by giving an example of each. Opcode Operand (4 marks) 13. The following are the incomplete steps of the Fetch Execute Cycle. Complete the steps by choosing the right word from the list below. IR PC circuits CU operand 1. fetches the opcode from memory location indicated by the PC. 2. CU places opcode in. 3. CU fetches the required. 4. CU increments to point to the next instruction. 5. CU activates necessary to execute instruction. 6. Go back to step 1. (10 marks) Page 11 of 12

END OF EXAM PAPER Page 12 of 12