C omputing Making binary relevant to programming An education collaboration: Langley Grammar School.

Slides:



Advertisements
Similar presentations
Base 10 Denary Decimal
Advertisements

Processing Data.
Chapter 1 Data Storage. 2 Chapter 1: Data Storage 1.1 Bits and Their Storage 1.2 Main Memory 1.3 Mass Storage 1.4 Representing Information as Bit Patterns.
1 Chapter Overview Computer Communication The Computer Bus Objectives  Understand how a computer transmits and receives information.  Explain the principles.
Binary Aim: Explain binary and binary units Objective 1: Convert positive denary whole numbers (0-255) into 8-bit binary numbers and vice versa Objective.
Computer Systems 1 Fundamentals of Computing
Hexadecimal and ASCII Lesson Objective: Understand the purpose of ASCII and how to use it. Lesson Outcome: Convert between Hexadecimal and ASCII Convert.
Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes.
Bits and Bytes.
Communications Technology 2104 Mercedes Lahey. Bit 1. bit=From a shortening of the words “binary digit” 2. the basic unit of information for computers.
Memory Terminology & Data Representation CSCI 1060 Fall 2006.
Bits and Bytes in a computers memory Inside the computer are millions of electronic switches. These are grouped together in bundles of 8. A switch can.
Binary Numbers and ASCII and EDCDIC Mrs. Cueni. Data Representation  Human speech is analog because it uses continuous signals (waves) that vary in strength.
MAC OS – Unit A Page: 10-11, Investigating Data Processing Understanding Memory.
Chapter 2 Computer Hardware
Computer Programming I. Today’s Lecture  Components of a computer  Program  Programming language  Binary representation.
Hardware Data Storage.
Data Representation and Storage Lecture 5. Representations A number value can be represented in many ways: 5 Five V IIIII Cinq Hold up my hand.
Fill in the blanks: (1) _________ has only two possible values 0 and 1. (2) There are __________bits in a byte. (3) 1 kilobyte of memory space can store.
CS151 Introduction to Digital Design
Journal Entry: Unit #5 Entry #3 Define the following words from ch2 in your journals: Binary, bit, discrete, unambiguous signals, digital, analog signal,
Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 0 Lesson 1 Number System.
Numerical Representation Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg 1.
Computer Science Binary. Binary Code Remember the power supply that is inside your computer and how it sends electricity to all of the components? That.
Do it now activity Can you work out what the missing symbols are and work out the order they should be in if the table shows smallest to largest KB kilobyte.
Working with 8-bit bytes and hexadecimal
Number Bases and Representation. Denary Number System (Base 10) Our number system uses 10 digits (0-9) As you move from right to left each number is worth.
GCSE ICT Storing data - Internal memory, backing storage, and measuring memory.
Networking for Home and Small Businesses –.  Explain the binary representation of data.
Thursday 8 th October, 2015 Information Technology Fundamentals of Hardware & Software.
2.1.4 Data Representation Units.
ASCII AND EBCDIC CODES By : madam aisha.
BINARY Toby Wilson. LEARNING OBJECTIVES  Be able to convert binary to denary  Be able to convert denary into binary  Be able to explain how computers.
Lesson Aim (Data representation) To be able to: Convert B/D & D/B Convert D/H & H/D Convert H/B & B/H Perform simple binary arithmetic Represent a number.
A+ Computer Repair Lesson 3: Number System. Objectives Define binary, decimal, octal, and hexadecimal numbering systems. Define binary, decimal, octal,
 Computers are 2-state devices › Pulse – No pulse › On – Off  Represented by › 1 – 0  BINARY.
Understanding Computers
Binary a. express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal;
Binary Numbers. Base 10 and Base 2  We normally work with numbers in base 10.  In base 10 we use the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.  Everything.
CC111 Lec#2 The System Unit The System Unit: Processing and Memory Lecture 2 Binary System.
Understanding Binary Understanding Computers. Understanding Computers L3 – Understanding Binary Learning Objectives All will Understand why all data is.
Numerical Representation Intro to Computer Science CS1510 Dr. Sarah Diesburg 1.
 Human language : commonly used to express feeling and understand what other people expression.  Computer language : are a languages by which a user.
© OCR 2016 Unit 2.6 Data Representation Lesson 1 ‒ Numbers.
Binary and Hard Disk PEOPLE Program
Understanding binary Understanding Computers.
Binary, Denary, Hexadecimal Conversion Binary Addition
Binary Numbers and ASCII and EDCDIC
3.1 Denary, Binary and Hexadecimal Number Systems
Lesson Objectives Aims
Numerical Representation
Introduction to Chapter 2
Information Support and Services
What is Binary? Binary is a two-digit (Base-2) numerical system, which computers use to process and store data. The reason computers use the binary system.
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
Denary to Binary Numbers & Binary to Denary
…to GCSE Level with Python Sue Sentance
Chapter 1 Data Storage.
Data Representation Numbers
Numerical Representation
Bits, Bytes, and Storage.
Numerical Representation
Why computers use binary
Binary System.
Information Technology Department
Hexadecimal.
LO1 – Understand Computer Hardware
WJEC GCSE Computer Science
Numerical Representation
Presentation transcript:

C omputing Making binary relevant to programming An education collaboration: Langley Grammar School

C omputing Copyright This educational resource is available for free download for personal and educational use. It is distributed under a Creative Commons Attribution – Noncommercial – NoDerivs licence, for more details please visit the Creative Commons website.Creative Commons website. Essentially it means that you are free to copy, distribute, and display these educational resources provided you make no changes to the content (including the attribution to the authors and these license terms); you may not use these educational resources for commercial purposes, and you may not alter, transform, or build upon this. We encourage the use of these materials in educational setting, and you are welcome to print your own copy of the book and distribute worksheets from it to students. Any of the above conditions maybe waived if you get written permission from the copyright holder. We welcome enquiries and suggestions, which should be directed to the author on

C omputing Denary explained NumberTHTU Explanation: Think back to when you were in primary school. You learnt to organise numbers in multiples of ten’s It makes it easier that you have ten fingers and thumbs.

C omputing Denary NumberTHTU

C omputing Denary NumberTHTU

C omputing Binary explained Number Explanation: Binary is the language computers understand. Computers only work with values of 1 and 0. The reason for this is computers work on circuit boards where there is either high voltage (1) or low voltage (0).

C omputing Learning Binary CS Unplugged activity: ed-01-binary_numbers.pdf ed-01-binary_numbers.pdf

C omputing Binary Number

C omputing Binary Number

C omputing CS Unplugged activity: ed-01-binary_numbers.pdf ed-01-binary_numbers.pdf Extension

C omputing Bit of a byte No of bits/bytesCommon description of bits/bytes 1 bita 1 or a 0 (b) 4 bits1 nibble 8 bits1 byte (B) 1024 bytes (1024 x 8 bits)1 Kilobyte (KB) 1024 Kilobytes1 Megabyte (MB) 1024 Megabytes1 Gigabyte (GB) 1024 Gigabytes1 Terabyte (TB)

C omputing Hexadecimal explained 1 Explanation: Used as a shorthand notation for binary number patterns! Converting denary numbers into hexadecimal. Step 1: First convert the denary number 146 into binary ( ). Step 2: Then divide the byte i.e. 8 bits, into two nibbles i.e. 4 bits (1001 | 0010). Step 3: Use the Binary to hexadecimal table to find out the hexadecimal ( 1001 = 9 and 0010= 2 ). Step 4: Put the answers together ( 92 ). Number Hexadecimal DenaryBinaryHexadecimal

C omputing Binary into Hexadecimal DenaryBinaryHexadecimal A B C D E F Binary to hexadecimal table

C omputing Hexadecimal explained 2 Number Hexadecimal E3 DenaryBinaryHexadecimal /0011E3 Explanation: Used as a shorthand notation for binary number patterns! Example: converting E3 hexadecimal into a number Step 1: First start with the two characters E and 3. Step 2: Using the Hexadecimal to denary table work out the binary for E ( 1110 ) and for 3 ( 0011 ). Step 3: Put these together ( ). Step 4: Work out what the denary number using the binary ( = 227 )

C omputing NumberHex E 633F A 754B NumberHex 764D 774E 784F A 904D NumberASCII A 1076B 1086C 1096D NumberHex 1106E 1116F A Binary into Hexadecimal Denary into Hexadecimal table : Check your answers

C omputing Hexadecimal Number Hexadecimal D

C omputing Hexadecimal Number Hexadecimal D B E1

C omputing ASC II explained Explanation: ASCII – American Standard Code for Information Interchange Uses 7 bits of a byte to represent 128 characters that humans can use to represent numbers and letters. The eight bit of the byte is used as a parity (check) digit. Number ASCII C Binary Number ASCII 65A 66B 67C 68D

C omputing Binary Number ASCII 33! ? 65A 66B 67C 68D 69E 70F 71G 72H 73I 74J 75K Binary Number ASCII 76L 77M 78N 79O 80P 81Q 82R 83S 84T 85U 86V 87W 88X 89Y 90Z Binary Number ASCII 97a 98b 99c 100d 101e 102f 103g 104h 105i 106j 107k 108l 109m Binary Number ASCII 110n 111o 112p 113q 114r 115s 116t 117u 118v 119w 120x 121y 122z Binary into ASCII Characters

C omputing ASC II Number ASCII C t n !

C omputing ASC II Number ASCII C o m p u t i n g !

C omputing Error Checking Error checking An extra (Parity) bit, is added to the bit pattern for ASC II characters for checking. A computer uses either odd or even parity. In a odd-parity system the extra bit is set so that the total number of 1 bits in a bit pattern is an odd number. In a even-parity system the extra bit is set so that the total number of 1 bits in a bit pattern is an even number. What if there is an error? It will resend (transmit) the message again. CharacterParity F CharacterParity F Character F

C omputing ASC II (eighth bit) Error checking activity: (Magic Trick) Explanation: What about the eighth bit of the byte that is used as a parity (check) digit? How does it work?

C omputing Compilers and interpreters United Nations analogy Discuss the following points: Which politician (A, B or C) will have the best understanding during the speech and why? What benefits and problems would the politician have from listening to the speech at the time? Which translation will be of the better quality: the immediate translation through the headphones or the written translated transcript completed after the speech? What benefits and problems would the politician have from reading the translated script after the speech?

C omputing Link to computing Compliers In a compiler the code for the whole program is converted only once, which can be a slow process, but once it is compiled the executable file is then stored on the hard disk. You will have seen these on your computer as files ending in.exe, such as WinWord.exe for Microsoft Word and Excel.exe for Microsoft Excel. It is much faster to run a compiled program as it is in the language the computer understands. The code of executable file cannot be altered once it has been created.

C omputing Link to computing Interpreters When an interpreter runs, it reads each line of code in the program and converts it line by line. This happens every time the program is run. Consequently it is very slow as it is converting the program code while the program is running. It can be as much as 5-10 times slower than running the executable file; because every line of code has to be re-read, then re-processed each time the program is run.

C omputing Link to computing Thinking: Relate the above two forms of translation in the UN analogy to compilers and interpreters. (a) the immediate translation through the headphones (b) the written translated transcript completed after the speech. Which represents the compiler and why? Which represents the interpreter and why?

C omputing Roller coaster interpreter Programming Language Motor question IF log fume is at the top THEN wait 0.01 second and turn off motor ELSE loop back to motor question Binary programme