WJEC GCSE Computer Science

Slides:



Advertisements
Similar presentations
Information Representation
Advertisements

Base 10 Denary Decimal
A-Level Computing#BristolMet Session Objectives#8 express numbers in binary, octal and hexadecimal explain the use of code to represent a character set.
Representing Data, Pictures, Time, and Size in Computer
Binary Representation Introduction to Computer Science and Programming I Chris Schmidt.
Binary Expression Numbers & Text CS 105 Binary Representation At the fundamental hardware level, a modern computer can only distinguish between two values,
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.
Number Systems & Logic Gates Day 1
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.
1 Survey of Computer Science CSCI 110, Spring 2011 Lecture 16 Digital Circuits, binary Numbers.
Memory Terminology & Data Representation CSCI 1060 Fall 2006.
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
Chapter 2 Computer Hardware
Computer Structure & Architecture 7c - Data Representation.
Computing Theory – F453 Number Systems. Data in a computer needs to be represented in a format the computer understands. This does not necessarily mean.
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.
Data Representation Conversion 24/04/2017.
2.1.4 Data Representation Units.
Representing Characters in a Computer System Representation of Data in Computer Systems.
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.
09/06/ Data Representation ASCII, Binary Denary Conversion, Integer & Boolean data types.
A+ Computer Repair Lesson 3: Number System. Objectives Define binary, decimal, octal, and hexadecimal numbering systems. Define binary, decimal, octal,
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.
Understanding Binary Understanding Computers. Understanding Computers L3 – Understanding Binary Learning Objectives All will Understand why all data is.
1.4 Representation of data in computer systems Character.
Nat 4/5 Computing Science Data Representation Lesson 3: Storing Text
Nat 4/5 Computing Science Data Representation Lesson 3: Storing Text
DATA REPRESENTATION - TEXT
Binary Representation in Text
Binary Representation in Text
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
Understanding binary Understanding Computers.
Computer basics.
3 – Boolean Logic and Logic Gates 4 – Binary Numbers
Chapter 3 - Binary Numbering System
Binary, Denary, Hexadecimal Conversion Binary Addition
Arithmetic Shifts and Character Representation
Lesson Objectives Aims You should be able to:
3.1 Denary, Binary and Hexadecimal Number Systems
Lesson Objectives Aims
CSCI 198: Lecture 4: Data Representation
CSCI 161: Lecture 4: Data Representation
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.
Intermediate 2 Computing
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
Denary to Binary Numbers & Binary to Denary
…to GCSE Level with Python Sue Sentance
Data Encoding Characters.
Folders out, planners out…
Representing Characters
Digital Electronics & Logic Design
Data Representation Conversion 05/12/2018.
Information Representation
COMS 161 Introduction to Computing
(return of the…) Data blast
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
A-level Computer Science
Learning Intention I will learn how computers store text.
Hexadecimal.
Component 1 – 2A, B, C Binary Logic
UNIT – 3 & 4. Data Representation and Internal
Binary.
GCSE COMPUTER SCIENCE Topic 3 - Data 3.3 Logical and Arithmetic Shifts.
Chapter 3 - Binary Numbering System
Section 6 Primitive Data Types
Presentation transcript:

WJEC GCSE Computer Science Unit 1 Data Representation

Objectives To identify and explain data representation in Computer Systems: The nature of data Why data needs to be converted to Binary Binary Numbers Binary Numbers Representing Characters (Character Sets) Hexadecimal Numbers Data Types including: Integer, Real, Boolean, Character, and String Use techniques to convert between Binary, Denary, and Hexadecimal Perform Binary Arithmetic To explain the use of Boolean Logical Operators: AND, OR, NOT, XOR Gates

Data and Information Data is made up of raw facts and figures and can be represented in many different forms including text, numbers, pictures, sounds, video clips. Information can be derived from data when it is processed.

Binary Bits Each 1 or 0 is called a bit - 1 8 bits is called a byte – e.g. 11100101 4 bits is called a nibble – e.g. 1010 In the same way as a kilometre is 1000 meters, we can group together 1024 bytes and call it a kilobyte Size Equal to 8 bits 1 byte 1024 bytes 1 kilobyte 1024 kilobytes 1 megabyte 1024 megabytes 1 gigabyte 1024 gigabytes 1 terabyte

Converting Data into Binary Format You will need to be familiar with three different counting systems. Hexadecimal Denary Binary

Binary

Arithmetic Shifts: Notes! Arithmetic Shifts You can shift a binary number left (*) or right (/) to multiply (*) or divide (/) Shift Left To shift a number left you move all of the 1s to the left X many times. Every time you shift left 1 the number multiplies by 2. Shift Right To shift a number right you move all of the 1s to the right X many times. Every time you shift right 1 the number divides by 2. 128 64 32 16 8 4 2 1 Original = 12 Left 1 24 Left 2 48 128 64 32 16 8 4 2 1 Original = 192 Right 1 96 Right 2 48

Binary Numbers Representing Characters A character can be a letter, digit, space, punctuation mark or various other symbols. When characters are stored on a computer system, they are stored as a binary number. It is important that computer systems recognise that characters can be represented differently by other computer systems; otherwise data could not be exchanged between computers.

Character Set, Unicode and ASCII In order to allow for data exchange between computer systems, character sets were devised. A character set is a table that maps a character with a unique binary number. One such character set is the 7-bit American Standard Code for Information Interchange (ASCII).

ASCII Character Set Using the ASCII character set, the character A would be stored as the binary number 1000001. The problem with using this ASCII character set is that it is only able to represent 128 different characters and computer systems need to be able to store more characters than this. As a result, other character sets were developed and used to allow computer systems to store more characters.

Unicode Character Set Unicode is a standard character set that has combined and replaced many others. It was originally an extension to the ASCII character set and it contains many of the characters used around the world.

Workbook Complete section 2a Q1-2 and hand it in at the end of the lesson

Truth Tables and Logical Operations Logical operators are used in programming. It is not unusual to find a code such as: IF A = 1 AND B = 1 THEN IF A = 1 OR B = 1 THEN A truth table for a logical operator defines the outputs for different combinations of input.

Truth Tables NOT The NOT logical operator has only one input and one output. The output is the opposite of the input.

Truth Tables AND The AND logical operator has two inputs and one output. The output is 1 only if A and B are both 1.

Truth Tables OR The OR logical operator has two inputs and one output. The output is 1 if either A or B is 1.

Workbook Complete section 2b Q1

Data Types Many different data types can be stored on a computer system. The data types which are commonly used are as follows:

Data Types

Bits, Nybbles, Bytes and more Computer systems can only store and process Binary digits, also known as BITs. A BIT is either a 1 or 0. When 8-bits are stored as a binary number, they are collectively called a byte.

Bits, Nybbles, Bytes and more

Workbook Complete section 2b Q2 and hand it in at the end of the lesson

Denary  Binary Convert the denary number 87 into binary. Your turn

The hexadecimal number for the denary number 198 is therefore C6 Denary  Hexadecimal Convert the denary number 198 into hexadecimal. Base 16 table Take 198 and see if it is more than the first number on the left. In this case, 256 is the number on the left and so we write a 0 under the heading 256. The next number in our Base 16 table is 16. If the number remaining, 198, is more than the next number on the left, 16, work out how many 16s are needed without going over the number remaining. In this case it is C (C = 12, 12 x 16 = 192). Remember that A = 10, B = 11, C = 12, D = 13, E = 14, F = 15 We now deduct 192 from our remaining denary number, 198, which leaves 6. The next number in our Base 16 table is 1. If the number remaining, 6, is more than the next number on the left, 1, work out how many 1s are needed without going over the number remaining. In this case it is 6. The hexadecimal number for the denary number 198 is therefore C6

Binary  Denary To convert a binary number into a denary number, draw a Base 2 table from right to left and populate the table with the binary number you are converting. Simply convert the binary number into a denary number by adding the headings with a 1 under them: 32 + 2 + 1 = 35. The denary number for the binary number 00100011 is therefore 35. Your turn

Binary  Hexadecimal Convert the binary number 10111001 into hexadecimal.

Hexadecimal  Denary Convert the hexadecimal number 0F7 into denary. Your turn DenHex Your turn HexDen

Hexadecimal Binary To convert a hexadecimal number into a binary number, there is a shortcut that you can use similar to the one above by drawing two 4-bit Base 2 tables from right to left.

Hexadecimal Binary In this example, we will convert the hexadecimal number 2B into a binary number. First start by representing the first number, 2, in the left table. Then complete the second table by representing B in the right table, remembering that B = 11.

Hexadecimal Binary Now re-label the headings in the left table as shown below and join the two 4-bit tables together to make one 8-bit table. And so, the hexadecimal number 2B can be represented as 00101011 in binary number form.

Workbook Complete section 2b Q3-5