ebook img

AS Computer Science for AQA Units 1 & 2 PDF

2016·51.24 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview AS Computer Science for AQA Units 1 & 2

AS Computer Science for AQA Units 1 & 2 Kevin R Bond Educational Computing Services Site licence - Poole Grammar School AS Computer Science for AQA Units 1 & 2 Kevin R Bond Educational Computing Services Ltd Site licence - Poole Grammar School Structure of the book The structure of this book follows closely the structure of AQA’s AS Computer Science specification for first teaching from September 2015. The content of the book has been constructed with the aim of promoting good teaching and learning, so where relevant practical activities have been suggested and questions posed for the student to answer. The book includes stimulus material to promote discussion and deeper thinking about the subject. Additional material to support teaching and learning will be available from the publisher’s website. About the author Dr Kevin R Bond is an experienced author. Kevin has 24 years of examining experience. He also has many more years of experience teaching AS and A Level Computing and Computer Science. Before becoming a computer science teacher, he worked in industry as a senior development engineer and systems analyst designing both hardware and software systems. Site licence - Poole Grammar School Published in 2016 by Educational Computing Services Ltd 42 Mellstock Road Aylesbury Bucks HP21 7NU United Kingdom Tel: 01296 433004 e-mail: [email protected] Every effort has been made to trace copyright holders and to obtain their permission for the use of copyrighted material. We apologise if any have been overlooked. The author and publisher will gladly receive information enabling them to rectify any reference or credit in future editions. First published in 2016 ISBN 978-0-9927536-7-2 Text © Kevin R Bond 2016 Original illustrations © Kevin R Bond 2016 Cover photograph © Kevin R Bond 2016 The right of Kevin R Bond to be identified as author of this work has been asserted by him in accordance with the Copyright, Designs and Patents Act 1988. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopy, recording or any information storage retrieval system, without permission in writing from the publisher or under licence from the Copyright Licensing Agency Limited, of Saffron House, 6 -10 Kirby Street, London, EC1N 8TS. Approval message from AQA The core content of this digital textbook has been approved by AQA for use with our qualification. This means that we have checked that it broadly covers the specification and that we are satisfied with the overall quality. We have also approved the printed version of this book. We do not however check or approve any links or any functionality. Full details of our approval process can be found on our website. We approve print and digital textbooks because we know how important it is for teachers and students to have the right resources to support their teaching and learning. However, the publisher is ultimately responsible for the editorial control and quality of this digital book. Please note that when teaching the AS (7516) course, you must refer to AQA’s specification as your definitive source of information. While this digital book has been written to match the specification, it cannot provide complete coverage of every aspect of the course. A wide range of other useful resources can be found on the relevant subject pages of our website: aqa.org.uk Site licence - Poole Grammar School Acknowledgements The author and publisher are grateful to the following for permission to reproduce images, clipart and other copyright material in this book under licence or otherwise: Chapter 1.1.3 Figure 1.1.3.2 Capstan Shutterstock / 381034510. Chapter 1.1.8 Figure 1.1.8.1 Rolling dice Shutterstock / 329817896. Chapter 1.2.1 Figure 1.2.1.2 Head silhouette Shutterstock / 152509136. Chapter 4.1.2 Figure 4.1.2.1 Ball of wool Shutterstock / 59259781. Figure 4.1.2.1 Woollen pullover Shutterstock / 85713035. Table 4.1.2.1 Music stave Shutterstock / 85713035. Figure 4.1.2.2 Capstan Sutterstock / 381034510. Task 1 - based on an exercise from CSInside Algorithm Development, CS department, Glasgow university Chapter 4.1.3 Figure 4.1.3.2 London underground map Reg. User No 16/E/3021/P Pulse Creative Ltd. Figure 4.1.3.5 Solar panels Shutterstock / 293938154. Figure 4.1.3.7 Shutterstock / 236943415 / 269590388 / 403734298 / 49052899. Chapter 4.1.7 Figure 4.1.7.1 ATM Queue Shutterstock / 276171293. Figure 4.1.7.2 Queue of people in silhouette Shutterstock / 253319245. Figure 4.1.7.8 Stack of books Shutterstock / 976714136. Chapter 4.1.8 Figure 4.1.8.3 © Crown copyright 2016 OS 100057707 and courtesy of Anquet Technology Ltd. Chapter 4.1.10 Figure 4.1.10.1 Lego bricks Shutterstock / 197086964. Chapter 5.1.1 Figure 1.1.1 “Late Babylonian clay tablet: table of numerals representing lunar longitudes”, image ID 00851897001, British Museum. Pages 1, 2: Clip art www.123rf.com: green apple: 123rf / 14199537; red apple: 123rf / 1419906; banana: 123rf / 39056131; orange: 123rf / 38547844; purse: 123rf / 27347756. Chapter 5.1.2 Page 4: Thermometer - “Thermometre froid a plat” Fotolia / 11368653 © Albachiara Page 5: Cake - 123rf / 33382329 (www.123rf.com). Chapter 5.1.4 Page 12: Greek character - 123rf / 32698394 (www.123rf.com). Chapter 5.1.5 Page 14: Road going off into the desert - www.canstockphoto / csp9388362. Chapter 5.1.7 Page 20: Dreaming sheep - Shutterstock / 110338271; Page 20: Ruler - Shutterstock / 198850166. Site licence - Poole Grammar School Chapter 5.2.1 Figure 2.1.1 Microsoft® Windows® 7 Calculator screenshot used with permission from Microsoft, Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries; Figure 2.1.4 Microsoft® Windows® 7 Device Manager version 6.1.7600.16385 screenshot used with permission from Microsoft. Chapter 5.3.1 Page 34: Penguins - Shutterstock / 114208987; Page 34: Peacock - 123rf / 36970936 (www.123rf.com). Page 34/35: Highway code signs used in question 2, and page 35 are based on Highway Code signs, © Crown copyright 2007, and are reproduced under Open Government Licence v3.0. Page 35: Tree rings - Shutterstock / 97674011; Figure 3.1.4 red apples - 123rf / 1419906 (www.123rf.com). Page 36: pound coin showing head - 123rf / 20150613_ml (www.123rf.com). Page 36: pound coin showing tail - 123rf / 35831780 (www.123rf.com). Chapter 5.3.2 Figure 3.2.2 Microsoft® Windows 7 command line window screenshot used with permission from Microsoft. Page 41: Apple® MacBookPro® and OS X® are trademarks of Apple Inc., registered in the U.S. and other countries. Chapter 5.4.3 Page 52: CPU - Shutterstock / 222009121. Chapter 5.5 Figure 5.5.1 Shutterstock / 157001045; Figure 5.5.2 Shutterstock / 1226401; Figure 5.5.3 Shutterstock / 185237537; Figure 5.5.5 123rf / 31206024 (www.123rf.com); Figure 5.5.6 123rf / 32168839 (www.123rf.com) Chapter 5.6.2 Figure 5.6.2.2 adapted with permission of Engineering Toolbox from www.engineeringtoolbox.com/air-altitude-pressure-d462.html with kind permission of the editor. Chapter 5.6.8 Figure 5.6.8.14 “A one-time pad” - reproduced with kind permission of Paul Reuvers, Crypto Museum (www.cryptomuseum.com). Figure 5.6.8.16 (a) “Image generated from random numbers generated by the PHP rand() function on Microsoft Windows.” idea for this courtesy of Bo Allen, http://boallen.com/ who kindly provided permission to use his PHP script to generate this image. Figure 5.6.8.17 “Gilbert Vernam” - image in public domain. Figure 5.6.8.19(a) “Plaintext image to be encrypted using a one-time pad.” - Mathematician & computer scientist Claude Shannon, Getty Image library, image 5337874 Chapter 8.1 Page 258 “Information Technology alone has this capacity to both automate and reflect information (informate)” - Professor Shoshana Zuboff, Charles Edward Wilson Professor of Business Administration at the Harvard Business School. Page 261 Memories for life: Page 99 “The Spy in the Coffee Machine” © Kieron O’Hara and Nigel Shadbolt 2008, reproduced with permission of the publishers Oneworld Publications. Page 260 Case study: “From Forbes.com, 16/02/2012 © 2012 Forbes LLC. All rights reserved. Used by permission and protected by the Copyright Laws of the United States. The printing, copying, redistribution, or retransmission of this Content without express written permission is prohibited.” http://www.forbes.com/ sites/kashmirhill/2012/02/16/how-target-figured-out-a-teen-girl-was-pregnant-before-her-father-did/ Site licence - Poole Grammar School Site licence - Poole Grammar School Contents How to use this book xi Introduction xii Numbering of chapters follows AQA’s specification numbering 1.1 Programming 1 1.1.1 Data types 1 1.1.2 Programming concepts 15 1.1.3 Arithmetic operations in a programming language 43 1.1.4 Relational operators in a programming language 51 1.1.5 Boolean operations in a programming language 53 1.1.6 Constants and variables in a programming language 56 1.1.7 String-handling operations 58 1.1.8 Random number generation in a programming language 87 1.1.9 Exception handling 92 1.1.10 Subroutines (procedures/functions) 97 1.1.11 Parameters of subroutines 100 1.1.12 Returning a value(s) from a subroutine 104 1.1.13 Local variables in subroutines 108 1.1.14 Global variables in a programming language 111 1.2 Procedural-oriented programming 115 1.2.1 Structured programming 115 2.1 Data structures and abstract data types 130 2.1.1 Data structures 130 2.1.2 Single- and multi-dimensional arrays (or equivalent) 132 2.1.3 Fields, records and files 155 3.1 Aspects of software development 166 3.1.1 Analysis 166 3.1.2 Design 172 3.1.3 Implementation 176 3.1.4 Testing 181 3.1.5 Evaluation 182 4.1 Abstraction and automation 184 4.1.1 Problem solving 184 4.1.2 Following and writing algorithms 191 4.1.3 Abstraction 200 4.1.4 Information hiding 204 4.1.5 Procedural abstraction 209 4.1.6 Functional abstraction 211 4.1.7 Data abstraction 213 Site licence - Poole Grammar School 4.1.8 Problem abstraction/reduction 217 4.1.9 Decomposition 222 4.1.10 Composition 223 4.1.11 Automation 227 4.2 Finite state machine (FSM) 228 4.2.1 Finite state machines (FSM) 228 5.1 Number systems 232 5.1.1 Natural numbers 232 5.1.2 Integer numbers 235 Whole numbers 236 5.1.3 Rational numbers 237 5.1.4 Irrational numbers 242 5.1.5 Real numbers 245 5.1.6 Ordinal numbers 249 5.1.7 Counting and measurement 251 5.2 Number bases 255 5.2.1 Number base 255 5.3 Units of information 265 5.3.1 Bits and bytes 265 5.3.2 Units 271 5.4 Binary number system 276 5.4.1 Unsigned binary 276 5.4.2 Unsigned binary arithmetic 279 5.4.3 Signed binary using two’s complement 283 5.4.4 Numbers with a fractional part 289 5.5 Information coding systems 294 ASCII 294 Unicode 296 Character form of a decimal digit 297 Error checking and correction 298 5.6 Representing images, sound and other data 303 5.6.1(1) Bit patterns, images, sound and other data 303 55.6.1(2) Bit patterns, images, sound and other data 307 5.6.1(3) Bit patterns, images, sound and other data 313 5.6.2 Analogue and digital 320 5.6.3 Analogue/digital conversion 326 5.6.4 Bitmapped graphics 336 5.6.5 Digital representation of sound 350 Site licence - Poole Grammar School 5.6.6 Musical Instrument Digital Interface(MIDI) 357 5.6.7 Data compression 363 5.6.8 Encryption 370 6.1 Hardware and software 402 6.1.1 Relationship between hardware and software 402 6.1.2 Classification of software 402 6.1.3 System software 404 6.1.4 Role of an operating system 405 6.2 Classification of programming languages 406 6.2.1 Classification of programming languages 406 6.3 Types of program translator 411 6.3.1 Types of program translator 411 6.4 Logic gates 417 6.4.1 Logic gates 417 6.5 Boolean algebra 427 6.5.1 Using Boolean algebra 427 7.1 Internal hardware components of a computer 437 7.1.1 Internal hardware components of a computer 437 7.2 The stored program concept 447 7.2.1 The meaning of the stored program concept 447 7.3 Structure and role of the processor and its components 450 7.3.1 The processor and its components 450 7.3.2 The Fetch-Execute cycle and the role of the registers within it 458 7.3.3 The processor instruction set 460 7.3.4 Addressing modes 466 7.3.5 Machine-code and assembly language operations 468 7.3.7 Factors affecting processor performance 484 7.4 External hardware devices 492 7.4.1 Input and output devices 492 7.4.2 Secondary storage devices 499 8.1 Individual (moral), social (ethical), legal and cultural issues and opportunities 506 8.1 Introduction 506 9.1 Communication 520 9.1.1 Communication methods 520 9.1.2 Communication basics 527 Site licence - Poole Grammar School

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.