General Certificate of Education Advanced Subsidiary Examination June 2015
|
|
|
- Sara Nichols
- 9 years ago
- Views:
Transcription
1 General Certificate of Education Advanced Subsidiary Examination June 2015 Computing COMP1 Unit 1 Problem Solving, Programming, Data Representation and Practical Exercise Monday 1 June am to am You will need to: access the Electronic Answer Document refer to the Preliminary Material and Skeleton Program. You must not use a calculator. Time allowed 2 hours Instructions Type the information required on the front of your Electronic Answer Document. Enter your answers into the Electronic Answer Document. Answer all questions. You will need access to: a computer a printer appropriate software an electronic version of the Skeleton Program a hard copy of the Preliminary Material. Before the start of the examination make sure your Centre Number, Candidate Name and Candidate Number are shown clearly in the footer of every page of your Electronic Answer Document (not the front cover). Information The marks for questions are shown in brackets. The maximum mark for this paper is 100. No extra time is allowed for printing and collating. The question paper is divided into four sections. You are advised to spend time on each section as follows: Section A 35 minutes Section B 15 minutes Section C 10 minutes Section D 60 minutes. At the end of the examination Tie together all your printed Electronic Answer Document pages and hand them to the invigilator. Warning It may not be possible to issue a result for this unit if your details are not on every page of your Electronic Answer Document. M/SEM/109508/Jun15/E4 COMP1
2 2 Section A You are advised to spend no more than 35 minutes on this section. Type your answers to Section A in your Electronic Answer Document. You must save this document at regular intervals. Question Represent the denary number 55 using 8-bit unsigned binary. Use the space below for rough working, then copy the answer to your Electronic Answer Document. 0 2 Represent the denary number 55 using hexadecimal. Use the space below for rough working, then copy the answer to your Electronic Answer Document. 0 3 Why are bit patterns often displayed using hexadecimal instead of binary? 0 4 Represent the denary number -59 as an 8-bit two s complement binary integer. Use the space below for rough working, then copy the answer to your Electronic Answer Document. [2 marks]
3 3 0 5 Represent the denary number as an unsigned binary fixed point number with three bits before and five bits after the binary point. Use the space below for rough working, then copy the answer to your Electronic Answer Document. [2 marks] The ASCII system uses 7 bits to represent a character. The ASCII code in denary for the numeric character 0 is 48; other numeric characters follow on from this in sequence. The numeric character 0 is represented using 7 bits as Using 7 bits, express the ASCII code for the character '6' in binary. 0 7 How many different character codes can be represented using 7-bit ASCII? Use the space below for rough working, then copy the answer to your Electronic Answer Document. Examples of logical bitwise operators include AND, OR, NOT and XOR. 0 8 Describe how one of these logical bitwise operators can be used to convert the 7-bit ASCII code for a numeric character into a 7-bit pure binary representation of the number, (eg for the numeric character '1' would be converted to ). [2 marks] Turn over for the next question Turn over
4 4 Characters are transmitted using an 8-bit code that includes the 7-bit ASCII code and a single parity bit in the most significant bit. A parity bit is added for error checking during data transmission. 0 9 Using even parity, what 8-bit code is sent for the numeric character '0'? Hamming code is an alternative to the use of a single parity bit. Hamming code uses multiple parity bits - this allows it to correct some errors that can occur during transmission. The parity bits are located in the power of two bit positions (1, 2, 4, 8, etc.). The other bit positions are used for the data bits. 1 0 Describe how the receiver can detect and correct a single-bit error using Hamming code. [4 marks] Figure 1 shows the bit pattern received in a communication that is using even parity Hamming code. The data bits received are Figure 1 Bit position Bit There has been a single-bit error in the data transmission. 1 1 Which bit position from the bit pattern in Figure 1 contains an error? Use the space below for rough working, then copy the answer to your Electronic Answer Document.
5 5 Figure 2 shows a Finite State Machine (FSM) represented as a state transition diagram. The machine takes a bit pattern as an input. The bit pattern is considered to be valid if the machine ends up in the accepting state S x. The bit patterns and are valid; the bit patterns and are not valid. Bit patterns are processed starting with the left-most bit. Figure 2 0 or 1 0 or 1 S x S i 0 or 1 S a 0 S b Sy 0 or S g 0 S e S j S h 0 or 1 S c 1 S d 1 0 S f 0 or Is the bit pattern a valid input for the FSM shown in Figure 2? 1 3 A finite state machine can also be represented as a state transition table. Table 1 shows part of the state transition table that represents the finite state machine shown in Figure 2. The state transition table is only partially complete. Table 1 Initial State Input New State S g 1 S y S y Complete Table 1 by filling in the unshaded cells. Copy the contents of all the unshaded cells in Table 1 into the Electronic Answer Document. [2 marks] Turn over
6 6 1 4 What is the purpose of the FSM shown in Figure 2? 1 5 The state S i in the FSM shown in Figure 2 is not necessary and is going to be removed from the FSM. Describe the change that needs to be made so that state S i can be removed without changing the functionality of the FSM. Question 2 Images are often represented in a computer s memory using vector graphics. A vector graphic consists of a collection of objects. 1 6 State three items of data that would need to be stored about a circle object if it is to be represented using vector graphics. [3 marks] Instead of representing an image as a vector graphic, it could be represented as a bitmapped image. 1 7 Describe how an image can be represented as a bitmapped image in a computer s memory. [3 marks] 1 8 Describe three advantages of using vector graphics instead of bitmaps to represent images. [3 marks]
7 7 Question 3 A pseudo-code representation of an algorithm is given in Figure 3. The function Len takes a string, S, and returns an integer value that is the number of characters in the string S, eg Len("Hello") would return a value of 5 The function GetChar takes a string, S, and an integer value, n, and returns the character that is in the nth position in the string S, eg GetChar("Hello", 2) would return the character e GetChar("Hello", 1) would return the character H The function Concat takes two strings, S1 and S2, and returns a string that is the string S1 followed by the string S2, eg Concat("Hello"," sunshine") would return the string Hello sunshine Figure 3 INPUT IStr OStr "" Count 1 WHILE Count <= Len(IStr) DO OStr Concat(GetChar(IStr, Count), OStr) Count Count + 1 ENDWHILE 1 9 Dry run the algorithm shown in Figure 3 by completing Table 2 for when the user enters the string "Lou". The first row has been done for you. Copy the cells in Table 2 that contain your answer into the Electronic Answer Document. Table 2 IStr OStr Count Lou 1 [5 marks] Turn over
8 8 Section B You are advised to spend no more than 15 minutes on this section. Type your answers to Section B in your Electronic Answer Document. You must save this document at regular intervals. The question in this section asks you to write program code starting from a new program/project/file. Save your program/project/file in its own folder/directory. You are advised to save your program at regular intervals. Question 4 Create a folder/directory Question4 for your new program. The algorithm, represented using pseudo-code in Figure 4, and the variable table, Table 3, describe a program that calculates and displays all of the prime numbers between 2 and 50, inclusive. The MOD operator calculates the remainder resulting from an integer division eg 10 MOD 3 = 1. If you are unsure how to use the MOD operator in the programming language you are using, there are examples of it being used in the Skeleton Program. Figure 4 OUTPUT "The first few prime numbers are:" FOR Count1 2 TO 50 DO Count2 2 Prime "Yes" WHILE Count2 * Count2 <= Count1 DO IF (Count1 MOD Count2 = 0) THEN Prime "No" ENDIF Count2 Count2 + 1 ENDWHILE IF Prime = "Yes" THEN OUTPUT Count1 ENDIF ENDFOR
9 9 Identifier Data Type Purpose Table 3 Count1 Integer Stores the number currently being checked for primeness Count2 Integer Stores a number that is being checked to see if it is a factor of Count1 Prime String Indicates if the value stored in Count1 is a prime number or not What you need to do Write a program for the algorithm in Figure 4. Run the program and test that it works correctly. Save the program in your new Question4 folder/directory. Evidence that you need to provide Include the following in your Electronic Answer Document: 2 0 Your PROGRAM SOURCE CODE. [11 marks] 2 1 SCREEN CAPTURE(S) for the test showing the correct working of the program. 2 2 Describe the changes that would need to be made to the algorithm shown in Figure 4, so that instead of displaying the prime numbers between 2 and 50, inclusive, it displays all the prime numbers between 2 and a value input by the user, inclusive. [3 marks] Turn over for Section C Turn over
10 10 Section C You are advised to spend no more than 10 minutes on this section. Type your answers to Section C in your Electronic Answer Document. You must save this document at regular intervals. These questions refer to the Preliminary Material and require you to load the Skeleton Program, but do not require any additional programming. Refer either to the Preliminary Material issued with this question paper or your electronic copy. Question 5 State the name of an identifier for: 2 3 a named constant 2 4 a user-defined subroutine that has only one parameter 2 5 a two-dimensional array or an equivalent list. Look at the MakeMove subroutine. 2 6 Describe how this subroutine could be rewritten so that instead of there being three lines of code that change the value in the start square, there could be just one line of code that does this. The functionality of the MakeMove subroutine should not be altered by the changes you describe.
11 11 Look at the last selection structure in the MAIN PROGRAM BLOCK. 2 7 What is the purpose of this selection structure? [2 marks] 2 8 The logic of a selection structure can be represented using a decision table. Table 4 shows an attempt to represent the logic of this selection structure. Table 4 Conditions >= 97 Y N Y Y <= 123 N Y N Y Action Change value of PlayAgain X X X Explain why this decision table is not an accurate representation of the logic of this selection structure. [3 marks] Turn over for Section D Turn over
12 12 Section D You are advised to spend no more than 60 minutes on this section. Type your answers to Section D in your Electronic Answer Document. You must save this document at regular intervals. These questions require you to load the Skeleton Program and make programming changes to it. Question 6 This question refers to the MAIN PROGRAM BLOCK and will extend the functionality of the Skeleton Program. The number of moves made by the players in a game of CAPTURE THE SARRUM will be tracked. A variable called NoOfMoves will be used to store the number of moves completed by the players. At the start of every game NoOfMoves should be set to an initial value of zero. Each time a player enters a legal move 1 should be added to the value stored in NoOfMoves. After the call to the MakeMove subroutine, the NoOfMoves variable should be updated and then a message should be displayed saying "The number of moves completed so far: n" where n is the value of NoOfMoves. Test that the changes you have made work: run the Skeleton Program enter N when asked if you want to play the sample game enter a start square of 17 and a fi nish square of 16 enter a start square of 12 and a fi nish square of 13 enter a start square of 18 and a fi nish square of 17. Evidence that you need to provide Include the following in your Electronic Answer Document. 2 9 Your PROGRAM SOURCE CODE for the amended MAIN PROGRAM BLOCK. [4 marks] 3 0 SCREEN CAPTURE(S) showing the requested test. [2 marks]
13 13 Question 7 This question refers to the subroutine CheckMoveIsLegal. When the user has entered the start square and the finish square for their move, a number of checks are made to see if their intended move is legal. Add a validation check to the subroutine CheckMoveIsLegal, so that a move is accepted as being legal only if the finish square refers to a square that is on the board. Test that the changes you have made work: run the Skeleton Program enter N when asked if you want to play the sample game enter a start square of 88 and a fi nish square of 98 enter a start square of 18 and a fi nish square of 19 enter a start square of 87 and a fi nish square of 86. Evidence that you need to provide Include the following in your Electronic Answer Document: 3 1 Your PROGRAM SOURCE CODE for the amended subroutine CheckMoveIsLegal. [4 marks] 3 2 SCREEN CAPTURE(S) showing the requested test. You must make sure that evidence for all parts of the requested test by the user is provided in the SCREEN CAPTURE(S). [3 marks] Turn over for Question 8 Turn over
14 14 Question 8 This question will extend the functionality of the game. A new type of piece is to be added to the game a kashshaptu (witch). When a redum is promoted, instead of changing into a marzaz pani it changes into a kashshaptu. A kashshaptu moves in the same way as a sarrum (one square in any direction). Like all the other pieces, a kashshaptu cannot move into a square containing a piece of the same colour and when a kashshaptu is moved into a square containing the opponent s sarrum, it captures the sarrum and the game is over. When a move would cause the kashshaptu to enter a square containing one of the opponent s pieces (except the sarrum), the kashshaptu stays in its start square and the opponent s piece changes colour and now belongs to the player who played the kashshaptu. It then becomes the other player's turn. Figures 5 and 6 show diagrams giving examples of legal kashshaptu moves. A kashshaptu is represented by the symbol K.
15 15 Figure WK WG 4 5 White s kashshaptu can move one square in any direction 6 WS BS White enters a start square of 23 and a finish square of 22. The board should now look like this: 1 2 WK 3 WG WS BS Turn over
16 16 Figure BG 3 WK WG WS BS White s kashshaptu can move one square in any direction White enters a start square of 23 and a finish square of 22. The board should now look like this: 1 2 WG 3 WK WG WS BS White s kashshaptu stays in its original square and the black gisgigir has now become a white gisgigir
17 17 Task 1 Adapt the program source code for the CheckMoveIsLegal subroutine, so that a kashshaptu (represented by the letter K) has the same legal moves as a sarrum. Evidence that you need to provide Include the following in your Electronic Answer Document: 3 3 Your PROGRAM SOURCE CODE for the amended subroutine CheckMoveIsLegal. Task 2 Adapt the program source code for the MakeMove subroutine, so that when a redum is promoted, it becomes a kashshaptu (represented by the symbol K) and so that a kashshaptu moves and captures in the way described. You need to adapt only the program source code so that the player with the White pieces can promote a redum to a kashshaptu and move a kashshaptu. Task 3 Test that the changes you have made work: run the Skeleton Program enter Y when asked if you want to play the sample game enter a start square of 12 and a finish square of 11 enter a start square of 41 and a finish square of 31 enter a start square of 11 and a finish square of 21 enter a start square of 31 and a finish square of 22 enter a start square of 11 and a finish square of 22. Evidence that you need to provide Include the following in your Electronic Answer Document: 3 4 Your amended PROGRAM SOURCE CODE for the subroutine MakeMove. [5 marks] 3 5 SCREEN CAPTURE(S) showing the requested test. [3 marks] Turn over
18 18 Question 9 This question will further extend the functionality of the Skeleton Program. You can attempt this question regardless of whether or not you produced a solution to Question 8 that correctly added the kashshaptu piece to the game. Forsyth-Edwards Notation (FEN) is a standard notation used to describe a particular board position of a chess game. The purpose of FEN is to provide all the information necessary to represent the current state of a game of chess, so that it can be restarted from a particular position. FEN can be adapted to represent game positions from chess variants like CAPTURE THE SARRUM. FEN defi nes a particular game position in one line of text using ASCII characters. This line of text can then be saved into a fi le or copied for use in another program. To represent a game position in CAPTURE THE SARRUM, the FEN needs to represent two items of information about the game position the board state (what pieces are on what squares) and which player s turn it is. The fi rst item in a FEN record for CAPTURE THE SARRUM is the board state. The board state is represented rank by rank starting with rank 1 and ending with rank 8. Within each rank the contents of each square are described starting with fi le 1 and ending with fi le 8. Each piece is identifi ed by a single letter (S = sarrum, M = marzaz pani, G = gisgigir, E = etlu, N = nabu, R = redum, K = kashshaptu). White pieces are designated using uppercase letters (SMGENRK) and black pieces are designated using lowercase letters (smgenrk). Empty squares are represented using the digits 1 to 8 where the digit represents the number of consecutive empty squares. A / character is used to indicate the end of a rank. After the board state, there will be either a W or B character to indicate if it is White s or Black s turn. Figure 7 shows an example board position from a game and the equivalent FEN record. Figure 8 shows the initial board position and the equivalent FEN record.
19 19 Figure 7 1 BG BE BN BM BS BN BE BG 2 BR BR BR BR BR BR 3 BR 4 WR BR 5 6 WR 7 WR WR WR WR WR WR 8 WG WE WN WM WS WN WE WG It is Black s turn so the FEN record would be: genmsneg/rrr1r1rr/3r4/4rr2/8/3r4/rrr2rrr/genmsneg/b Turn over for Figure 8 Turn over
20 20 Figure 8 1 BG BE BN BM BS BN BE BG 2 BR BR BR BR BR BR BR BR WR WR WR WR WR WR WR WR 8 WG WE WN WM WS WN WE WG It is White s turn so the FEN record would be: genmsneg/rrrrrrrr/8/8/8/8/rrrrrrrr/genmsneg/w Task 1 Create a new subroutine, GenerateFEN, which takes two parameters (the board and whose turn it is) and creates a string containing the FEN record for the current state of a CAPTURE THE SARRUM game. It should return this string to the calling routine. You may choose whether to make the new subroutine a function or a procedure. You are likely to get some marks for this task, even if your subroutine is only partially working. It does not matter if your new subroutine will work correctly for positions containing a kashshaptu (from Question 8). Evidence that you need to provide Include the following in your Electronic Answer Document: 3 6 Your PROGRAM SOURCE CODE for the new subroutine GenerateFEN. [13 marks]
21 21 Task 2 Adapt the MAIN PROGRAM BLOCK so that the FEN record returned by the GenerateFEN subroutine is displayed before asking the player to enter their move. Task 3 Test your program works by conducting the following test: run the Skeleton Program enter Y when asked if you want to play the sample game. Evidence that you need to provide Include the following in your Electronic Answer Document: 3 7 Your PROGRAM SOURCE CODE for the amended MAIN PROGRAM BLOCK. [3 marks] 3 8 SCREEN CAPTURE(S) showing the requested test. [2 marks] END OF QUESTIONS
22 22 There are no questions printed on this page
23 23 There are no questions printed on this page
24 24 There are no questions printed on this page Copyright 2015 AQA and its licensors. All rights reserved.
Specimen 2015 am/pm Time allowed: 1hr 30mins
SPECIMEN MATERIAL GCSE COMPUTER SCIENCE 8520/1 Paper 1 Specimen 2015 am/pm Time allowed: 1hr 30mins Materials There are no additional materials required for this paper. Instructions Use black ink or black
The string of digits 101101 in the binary number system represents the quantity
Data Representation Section 3.1 Data Types Registers contain either data or control information Control information is a bit or group of bits used to specify the sequence of command signals needed for
Number Representation
Number Representation CS10001: Programming & Data Structures Pallab Dasgupta Professor, Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Topics to be Discussed How are numeric data
Computer Science 281 Binary and Hexadecimal Review
Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two
PROG0101 Fundamentals of Programming PROG0101 FUNDAMENTALS OF PROGRAMMING. Chapter 3 Algorithms
PROG0101 FUNDAMENTALS OF PROGRAMMING Chapter 3 1 Introduction to A sequence of instructions. A procedure or formula for solving a problem. It was created mathematician, Mohammed ibn-musa al-khwarizmi.
Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to:
Chapter 3 Data Storage Objectives After studying this chapter, students should be able to: List five different data types used in a computer. Describe how integers are stored in a computer. Describe how
Data Storage 3.1. Foundations of Computer Science Cengage Learning
3 Data Storage 3.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List five different data types used in a computer. Describe how
Report on the Examination
Version 1.0 0712 General Certificate of Education (A-level) June Computing COMP1 (Specification 2510) Unit 1: Problem Solving, Programming, Data Representation and Practical Exercise Report on the Examination
2011, The McGraw-Hill Companies, Inc. Chapter 3
Chapter 3 3.1 Decimal System The radix or base of a number system determines the total number of different symbols or digits used by that system. The decimal system has a base of 10 with the digits 0 through
2014 HSC Software Design and Development Marking Guidelines
014 HSC Software Design and Development Marking Guidelines Section I Multiple-choice Answer Key Question Answer 1 B A A 4 D 5 A 6 D 7 A 8 B 9 C 10 D 11 B 1 B 1 A 14 A 15 B 16 D 17 C 18 C 19 D 0 D 1 Section
Chapter 4: Computer Codes
Slide 1/30 Learning Objectives In this chapter you will learn about: Computer data Computer codes: representation of data in binary Most commonly used computer codes Collating sequence 36 Slide 2/30 Data
A-level COMPUTER SCIENCE
A-level COMPUTER SCIENCE Paper 2 TBC am/pm 2 hours 30 minutes Materials There are no additional materials required for this paper. Instructions Use black ink or black ball-point pen. Fill in the boxes
EE 261 Introduction to Logic Circuits. Module #2 Number Systems
EE 261 Introduction to Logic Circuits Module #2 Number Systems Topics A. Number System Formation B. Base Conversions C. Binary Arithmetic D. Signed Numbers E. Signed Arithmetic F. Binary Codes Textbook
NUMBER SYSTEMS. William Stallings
NUMBER SYSTEMS William Stallings The Decimal System... The Binary System...3 Converting between Binary and Decimal...3 Integers...4 Fractions...5 Hexadecimal Notation...6 This document available at WilliamStallings.com/StudentSupport.html
Levent EREN [email protected] A-306 Office Phone:488-9882 INTRODUCTION TO DIGITAL LOGIC
Levent EREN [email protected] A-306 Office Phone:488-9882 1 Number Systems Representation Positive radix, positional number systems A number with radix r is represented by a string of digits: A n
Sheet 7 (Chapter 10)
King Saud University College of Computer and Information Sciences Department of Information Technology CAP240 First semester 1430/1431 Multiple-choice Questions Sheet 7 (Chapter 10) 1. Which error detection
CSI 333 Lecture 1 Number Systems
CSI 333 Lecture 1 Number Systems 1 1 / 23 Basics of Number Systems Ref: Appendix C of Deitel & Deitel. Weighted Positional Notation: 192 = 2 10 0 + 9 10 1 + 1 10 2 General: Digit sequence : d n 1 d n 2...
Base Conversion written by Cathy Saxton
Base Conversion written by Cathy Saxton 1. Base 10 In base 10, the digits, from right to left, specify the 1 s, 10 s, 100 s, 1000 s, etc. These are powers of 10 (10 x ): 10 0 = 1, 10 1 = 10, 10 2 = 100,
Numeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals:
Numeral Systems Which number is larger? 25 8 We need to distinguish between numbers and the symbols that represent them, called numerals. The number 25 is larger than 8, but the numeral 8 above is larger
Application Unit, MDRC AB/S 1.1, GH Q631 0030 R0111
, GH Q631 0030 R0111 SK 0010 B 98 The application unit is a DIN rail mounted device for insertion in the distribution board. The connection to the EIB is established via a bus connecting terminal at the
Section 1.4 Place Value Systems of Numeration in Other Bases
Section.4 Place Value Systems of Numeration in Other Bases Other Bases The Hindu-Arabic system that is used in most of the world today is a positional value system with a base of ten. The simplest reason
The use of binary codes to represent characters
The use of binary codes to represent characters Teacher s Notes Lesson Plan x Length 60 mins Specification Link 2.1.4/hi Character Learning objective (a) Explain the use of binary codes to represent characters
Lecture 2. Binary and Hexadecimal Numbers
Lecture 2 Binary and Hexadecimal Numbers Purpose: Review binary and hexadecimal number representations Convert directly from one base to another base Review addition and subtraction in binary representations
1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal:
Exercises 1 - number representations Questions 1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal: (a) 3012 (b) - 435 2. For each of
CSC4510 AUTOMATA 2.1 Finite Automata: Examples and D efinitions Definitions
CSC45 AUTOMATA 2. Finite Automata: Examples and Definitions Finite Automata: Examples and Definitions A finite automaton is a simple type of computer. Itsoutputislimitedto yes to or no. It has very primitive
Colored Hats and Logic Puzzles
Colored Hats and Logic Puzzles Alex Zorn January 21, 2013 1 Introduction In this talk we ll discuss a collection of logic puzzles/games in which a number of people are given colored hats, and they try
Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur
Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 04 Digital Logic II May, I before starting the today s lecture
Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)
Unit- I Introduction to c Language: C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating
Chapter 1: Digital Systems and Binary Numbers
Chapter 1: Digital Systems and Binary Numbers Digital age and information age Digital computers general purposes many scientific, industrial and commercial applications Digital systems telephone switching
Binary Number System. 16. Binary Numbers. Base 10 digits: 0 1 2 3 4 5 6 7 8 9. Base 2 digits: 0 1
Binary Number System 1 Base 10 digits: 0 1 2 3 4 5 6 7 8 9 Base 2 digits: 0 1 Recall that in base 10, the digits of a number are just coefficients of powers of the base (10): 417 = 4 * 10 2 + 1 * 10 1
1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12
C5 Solutions 1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12 To Compute 0 0 = 00000000 To Compute 1 Step 1. Convert 1 to binary 00000001 Step 2. Flip the bits 11111110
Coding and decoding with convolutional codes. The Viterbi Algor
Coding and decoding with convolutional codes. The Viterbi Algorithm. 8 Block codes: main ideas Principles st point of view: infinite length block code nd point of view: convolutions Some examples Repetition
Regular Languages and Finite Automata
Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a
Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8
ECE Department Summer LECTURE #5: Number Systems EEL : Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz Decimal Number System: -Our standard number system is base, also
1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier.
Study Group 1 Variables and Types 1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier. 2. What does the byte 00100110 represent? 3. What is the purpose of the declarations
COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012
Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about
CS101 Lecture 11: Number Systems and Binary Numbers. Aaron Stevens 14 February 2011
CS101 Lecture 11: Number Systems and Binary Numbers Aaron Stevens 14 February 2011 1 2 1 3!!! MATH WARNING!!! TODAY S LECTURE CONTAINS TRACE AMOUNTS OF ARITHMETIC AND ALGEBRA PLEASE BE ADVISED THAT CALCULTORS
NUMBER SYSTEMS APPENDIX D. You will learn about the following in this appendix:
APPENDIX D NUMBER SYSTEMS You will learn about the following in this appendix: The four important number systems in computing binary, octal, decimal, and hexadecimal. A number system converter program
Systems I: Computer Organization and Architecture
Systems I: Computer Organization and Architecture Lecture 2: Number Systems and Arithmetic Number Systems - Base The number system that we use is base : 734 = + 7 + 3 + 4 = x + 7x + 3x + 4x = x 3 + 7x
AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping
AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping 3.1.1 Constants, variables and data types Understand what is mean by terms data and information Be able to describe the difference
Binary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal.
Binary Representation The basis of all digital data is binary representation. Binary - means two 1, 0 True, False Hot, Cold On, Off We must be able to handle more than just values for real world problems
6 3 4 9 = 6 10 + 3 10 + 4 10 + 9 10
Lesson The Binary Number System. Why Binary? The number system that you are familiar with, that you use every day, is the decimal number system, also commonly referred to as the base- system. When you
GCE Computing. COMP3 Problem Solving, Programming, Operating Systems, Databases and Networking Report on the Examination.
GCE Computing COMP3 Problem Solving, Programming, Operating Systems, Databases and Networking Report on the Examination 2510 Summer 2014 Version: 1.0 Further copies of this Report are available from aqa.org.uk
Accentuate the Negative: Homework Examples from ACE
Accentuate the Negative: Homework Examples from ACE Investigation 1: Extending the Number System, ACE #6, 7, 12-15, 47, 49-52 Investigation 2: Adding and Subtracting Rational Numbers, ACE 18-22, 38(a),
Positional Numbering System
APPENDIX B Positional Numbering System A positional numbering system uses a set of symbols. The value that each symbol represents, however, depends on its face value and its place value, the value associated
Reading 13 : Finite State Automata and Regular Expressions
CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model
plc numbers - 13.1 Encoded values; BCD and ASCII Error detection; parity, gray code and checksums
plc numbers - 3. Topics: Number bases; binary, octal, decimal, hexadecimal Binary calculations; s compliments, addition, subtraction and Boolean operations Encoded values; BCD and ASCII Error detection;
Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.
Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to
MACHINE INSTRUCTIONS AND PROGRAMS
CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER OBJECTIVES In this chapter you will learn about: Machine instructions and program execution, including branching and subroutine call and return operations
Chapter One Introduction to Programming
Chapter One Introduction to Programming 1-1 Algorithm and Flowchart Algorithm is a step-by-step procedure for calculation. More precisely, algorithm is an effective method expressed as a finite list of
Useful Number Systems
Useful Number Systems Decimal Base = 10 Digit Set = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} Binary Base = 2 Digit Set = {0, 1} Octal Base = 8 = 2 3 Digit Set = {0, 1, 2, 3, 4, 5, 6, 7} Hexadecimal Base = 16 = 2
Zeros, Ones, and the Morse Code
Zeros, Ones, and the Morse Code Subject Area(s) Associated Unit Associated Lesson Activity Title Header Number & operations, science & technology None None Zeros, Ones, and the Morse Code Insert image
CHESS Program for the PDP-8
CHEKMO-II Chess Program for the PDP-8 PAGE 1 CHESS Program for the PDP-8 ABSTRACT CHEKMO-II is a chess playing program which will run on any PDP-8 family computer. The program will play either the white
The programming language C. sws1 1
The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan
CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012
CDA 3200 Digital Systems Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012 Outline Data Representation Binary Codes Why 6-3-1-1 and Excess-3? Data Representation (1/2) Each numbering
Third Southern African Regional ACM Collegiate Programming Competition. Sponsored by IBM. Problem Set
Problem Set Problem 1 Red Balloon Stockbroker Grapevine Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers
Formal Languages and Automata Theory - Regular Expressions and Finite Automata -
Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March
Higher Computing Science Course Assessment Specification (C716 76)
Higher Computing Science Course Assessment Specification (C716 76) Valid from August 2014 This edition: June 2015, version 1.3 This specification may be reproduced in whole or in part for educational purposes
CNC Transfer. Operating Manual
Rank Brothers Ltd CNC Transfer Operating Manual Manufactured by: Rank Brothers Ltd 56 High Street, Bottisham, Cambridge CB25 9DA, England Tel: +44 (0)1223 811369 Fax: +44 (0)1223 811441 Website: http://www.rankbrothers.co.uk/
Arithmetic Coding: Introduction
Data Compression Arithmetic coding Arithmetic Coding: Introduction Allows using fractional parts of bits!! Used in PPM, JPEG/MPEG (as option), Bzip More time costly than Huffman, but integer implementation
ZIMBABWE SCHOOL EXAMINATIONS COUNCIL. COMPUTER STUDIES 7014/01 PAPER 1 Multiple Choice SPECIMEN PAPER
ZIMBABWE SCHOOL EXAMINATIONS COUNCIL General Certificate of Education Ordinary Level COMPUTER STUDIES 7014/01 PAPER 1 Multiple Choice SPECIMEN PAPER Candidates answer on the question paper Additional materials:
2010/9/19. Binary number system. Binary numbers. Outline. Binary to decimal
2/9/9 Binary number system Computer (electronic) systems prefer binary numbers Binary number: represent a number in base-2 Binary numbers 2 3 + 7 + 5 Some terminology Bit: a binary digit ( or ) Hexadecimal
SIM CARD PROTOCOLS. This paper attempts in broad strokes to outline the construction of these protocols and how they are used.
SIM CARD PROTOCOLS Though rarely thought about by most users their mobile phone contains a remarkable computing device that enables them to go about their business of making calls, text messaging or playing
1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.
File: chap04, Chapter 04 1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1. 2. True or False? A gate is a device that accepts a single input signal and produces one
Cambridge International Examinations Cambridge International General Certificate of Secondary Education
Cambridge International Examinations Cambridge International General Certificate of Secondary Education *0123456789* COMPUTER SCIENCE 0478/01 Paper 1 Theory For Examination from 2016 SPECIMEN PAPER 1 hour
Logic in Computer Science: Logic Gates
Logic in Computer Science: Logic Gates Lila Kari The University of Western Ontario Logic in Computer Science: Logic Gates CS2209, Applied Logic for Computer Science 1 / 49 Logic and bit operations Computers
Counting in base 10, 2 and 16
Counting in base 10, 2 and 16 1. Binary Numbers A super-important fact: (Nearly all) Computers store all information in the form of binary numbers. Numbers, characters, images, music files --- all of these
Copyright 2013 The National Council of Teachers of Mathematics, Inc. www.nctm.org. All rights reserved. This material may not be copied or
A W weet Copyright 203 The National Council of Teachers of Mathematics, Inc. www.nctm.org. All rights reserved. This material may not be copied or distributed electronically or in any other format without
Chapter 3. if 2 a i then location: = i. Page 40
Chapter 3 1. Describe an algorithm that takes a list of n integers a 1,a 2,,a n and finds the number of integers each greater than five in the list. Ans: procedure greaterthanfive(a 1,,a n : integers)
Algorithm & Flowchart & Pseudo code. Staff Incharge: S.Sasirekha
Algorithm & Flowchart & Pseudo code Staff Incharge: S.Sasirekha Computer Programming and Languages Computers work on a set of instructions called computer program, which clearly specify the ways to carry
Cyber Security Workshop Encryption Reference Manual
Cyber Security Workshop Encryption Reference Manual May 2015 Basic Concepts in Encoding and Encryption Binary Encoding Examples Encryption Cipher Examples 1 P a g e Encoding Concepts Binary Encoding Basics
28 Simply Confirming Onsite
28 Simply Confirming Onsite Status 28.1 This chapter describes available monitoring tools....28-2 28.2 Monitoring Operational Status...28-5 28.3 Monitoring Device Values... 28-11 28.4 Monitoring Symbol
Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage
Outline 1 Computer Architecture hardware components programming environments 2 Getting Started with Python installing Python executing Python code 3 Number Systems decimal and binary notations running
The resulting tile cannot merge with another tile again in the same move. When a 2048 tile is created, the player wins.
2048 2048 is number puzzle game created in March 2014 by 19-year-old Italian web developer Gabriele Cirulli, in which the objective is to slide numbered tiles on a grid to combine them and create a tile
LSN 2 Number Systems. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology
LSN 2 Number Systems Department of Engineering Technology LSN 2 Decimal Number System Decimal number system has 10 digits (0-9) Base 10 weighting system... 10 5 10 4 10 3 10 2 10 1 10 0. 10-1 10-2 10-3
So far we have considered only numeric processing, i.e. processing of numeric data represented
Chapter 4 Processing Character Data So far we have considered only numeric processing, i.e. processing of numeric data represented as integer and oating point types. Humans also use computers to manipulate
Informatica e Sistemi in Tempo Reale
Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)
Binary Numbers. Binary Octal Hexadecimal
Binary Numbers Binary Octal Hexadecimal Binary Numbers COUNTING SYSTEMS UNLIMITED... Since you have been using the 10 different digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 all your life, you may wonder how
ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite
ALGEBRA Pupils should be taught to: Generate and describe sequences As outcomes, Year 7 pupils should, for example: Use, read and write, spelling correctly: sequence, term, nth term, consecutive, rule,
Unit 1 Number Sense. In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions.
Unit 1 Number Sense In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions. BLM Three Types of Percent Problems (p L-34) is a summary BLM for the material
HOMEWORK # 2 SOLUTIO
HOMEWORK # 2 SOLUTIO Problem 1 (2 points) a. There are 313 characters in the Tamil language. If every character is to be encoded into a unique bit pattern, what is the minimum number of bits required to
MICROPROCESSOR AND MICROCOMPUTER BASICS
Introduction MICROPROCESSOR AND MICROCOMPUTER BASICS At present there are many types and sizes of computers available. These computers are designed and constructed based on digital and Integrated Circuit
I PUC - Computer Science. Practical s Syllabus. Contents
I PUC - Computer Science Practical s Syllabus Contents Topics 1 Overview Of a Computer 1.1 Introduction 1.2 Functional Components of a computer (Working of each unit) 1.3 Evolution Of Computers 1.4 Generations
Memory Systems. Static Random Access Memory (SRAM) Cell
Memory Systems This chapter begins the discussion of memory systems from the implementation of a single bit. The architecture of memory chips is then constructed using arrays of bit implementations coupled
SPECIMEN A451 GENERAL CERTIFICATE OF SECONDARY EDUCATION COMPUTING. Duration: 1 hour 30 minutes. Unit A451: Computer systems and programming
SPECIMEN GENERAL CERTIFICATE OF SECONDARY EDUCATION COMPUTING Unit A451: Computer systems and programming A451 Candidates answer on the Question Paper OCR Supplied Materials None Other Materials Required:
Sources: On the Web: Slides will be available on:
C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,
(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.
3130CIT: Theory of Computation Turing machines and undecidability (IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. An undecidable problem
Algorithms are the threads that tie together most of the subfields of computer science.
Algorithms Algorithms 1 Algorithms are the threads that tie together most of the subfields of computer science. Something magically beautiful happens when a sequence of commands and decisions is able to
Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.
1 Topics Machine Architecture and Number Systems Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number System Converting from Decimal to Binary Major Computer Components
An overview of FAT12
An overview of FAT12 The File Allocation Table (FAT) is a table stored on a hard disk or floppy disk that indicates the status and location of all data clusters that are on the disk. The File Allocation
Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.
Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole
Instructor Özgür ZEYDAN (PhD) CIV 112 Computer Programming http://cevre.beun.edu.tr/zeydan/
Algorithms Pseudocode Flowcharts (PhD) CIV 112 Computer Programming http://cevre.beun.edu.tr/zeydan/ Why do we have to learn computer programming? Computers can make calculations at a blazing speed without
Solution for Homework 2
Solution for Homework 2 Problem 1 a. What is the minimum number of bits that are required to uniquely represent the characters of English alphabet? (Consider upper case characters alone) The number of
First Bytes Programming Lab 2
First Bytes Programming Lab 2 This lab is available online at www.cs.utexas.edu/users/scottm/firstbytes. Introduction: In this lab you will investigate the properties of colors and how they are displayed
2003 HSC Notes from the Marking Centre Software Design and Development
00 HSC Notes from the Marking Centre Software Design and Development 004 Copyright Board of Studies NSW for and on behalf of the Crown in right of the State of New South Wales. This document contains Material
Pseudo code Tutorial and Exercises Teacher s Version
Pseudo code Tutorial and Exercises Teacher s Version Pseudo-code is an informal way to express the design of a computer program or an algorithm in 1.45. The aim is to get the idea quickly and also easy
The finite field with 2 elements The simplest finite field is
The finite field with 2 elements The simplest finite field is GF (2) = F 2 = {0, 1} = Z/2 It has addition and multiplication + and defined to be 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 0 0 = 0 0 1 = 0
COMPUTER SCIENCE. Paper 1 (THEORY)
COMPUTER SCIENCE Paper 1 (THEORY) (Three hours) Maximum Marks: 70 (Candidates are allowed additional 15 minutes for only reading the paper. They must NOT start writing during this time) -----------------------------------------------------------------------------------------------------------------------
Sample Questions Csci 1112 A. Bellaachia
Sample Questions Csci 1112 A. Bellaachia Important Series : o S( N) 1 2 N N i N(1 N) / 2 i 1 o Sum of squares: N 2 N( N 1)(2N 1) N i for large N i 1 6 o Sum of exponents: N k 1 k N i for large N and k
Binary Adders: Half Adders and Full Adders
Binary Adders: Half Adders and Full Adders In this set of slides, we present the two basic types of adders: 1. Half adders, and 2. Full adders. Each type of adder functions to add two binary bits. In order
