National 4 and National 5 Computer Science. National 4 Computing Science 2 units: Software Design and Development Information System Design and Development.

Slides:



Advertisements
Similar presentations
Information Representation
Advertisements

Technology ICT Option: Data Representation. Data Representation In our everyday lives, we communicate with each other using analogue data. This data takes.
Computer Systems Nat 4/5 Data Representation Lesson 4: Storing Graphics.
Copyright 2003 Monash University IMS5401 Web-based Information Systems Topic 2: Elements of the Web (d) Digital representation.
Binary Expression Numbers & Text CS 105 Binary Representation At the fundamental hardware level, a modern computer can only distinguish between two values,
Part A Multimedia Production Rico Yu. Part A Multimedia Production Ch.1 Text Ch.2 Graphics Ch.3 Sound Ch.4 Animations Ch.5 Video.
Text. Graphics Images – photos Animation Video Audio Text Copyright issues.
Nat 4/5 - Software Design and Development – Low Level Operations - 1 National 4/5 – Computing Science Information Systems Design and Development Media.
Prepared by George Holt Digital Photography BITMAP GRAPHIC ESSENTIALS.
Higher Computing Data Representation.
Computer Systems Nat 4.5 Computing Science Data Representation Lesson 4: Storing Graphics EXTENSION.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
Computing Higher - Unit 1… Computer Systems 1 Higher Computing Unit 1 – Topic 1 Data Representation.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
Higher Computing Computer Systems S. McCrossan 1 Higher Grade Computing Studies 1. Data Representation Data Representation – Why do we use binary? simplicity,
Data Representation Int 2 Computing Unit 1 – Computer Systems St Kentigern’s Academy.
CS Topic 1 - Data Representation v2 1 Data representation considers how a computer uses numbers to represent data inside the computer. Three types of data.
Chapter 2 Computer Hardware
Data Representation CS280 – 09/13/05. Binary (from a Hacker’s dictionary) A base-2 numbering system with only two digits, 0 and 1, which is perfectly.
Data Representation The method of data representation in a computer system depends upon the type of data which is being used. Three types of data are considered.
Common file formats  Lesson Objective: Understanding common file formats and their differences.  Learning Outcome:  Describe the type of files which.
1 Ethics of Computing MONT 113G, Spring 2012 Session 10 HTML Tables Graphics on the Web.
Marr CollegeHigher ComputingSlide 1 Higher Computing: COMPUTER SYSTEMS Part 1: Data Representation – 6 hours.
Graphics An image is made up of tiny dots called pixels (“picture elements”) The resolution determines the.
Int 2/ Higher - Data Representation - 1 Why use Binary? It is a two state system (on/off) which makes it simple to operate Even if degradation of current.
Data Representation The storage of Text Numbers Graphics.
Computer Systems Nat 4.5 Computing Science Data Representation Lesson 4: Representing and Storing Graphics EXTENSION.
Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data.
Media Types Information Systems can contain the following types of media: Sound, graphics, video & text.
CSCI-100 Introduction to Computing Hardware Part II.
Image File Formats. What is an Image File Format? Image file formats are standard way of organizing and storing of image files. Image files are composed.
COMP135/COMP535 Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 2 Lecture 2 – Digital Representations.
Know what a computer is used for Understand the difference between hardware and software Be able to describe the way that data is stored in a computer.
Information Systems Design and Development Media Types Computing Science.
Software Design and Development Storing Data Part 2 Text, sound and video Computing Science.
 Computers are 2-state devices › Pulse – No pulse › On – Off  Represented by › 1 – 0  BINARY.
DATA Unit 2 Topic 2. Different Types of Data ASCII code: ASCII - The American Standard Code for Information Interchange is a standard seven-bit code that.
Computer Systems Unit 2 v.2
Computer Systems Nat 5 Computing Science Data Representation
Computer Science: An Overview Eleventh Edition
Image and Sound Representation
Storing Graphics Nat 5 Data Representation Lesson 4a: Storing Graphics
GCSE COMPUTER SCIENCE Topic 3 - Data 3.3 Data Storage and Compression.
GCSE COMPUTER SCIENCE Topic 3 - Data 3.2 Data Representation.
Data Representation.
Denary to Binary Numbers & Binary to Denary
Level 3 Extended Diploma Unit 19 Computer Systems Architecture
Computer Systems Nat 4/5 Data Representation Lesson 4:
Binary Representation in Audio and Images
Computer Science Higher
BTEC NCF Dip in Comp - Unit 02 Fundamentals of Computer Systems Lesson 10 - Text & Image Representation Mr C Johnston.
Intermediate 2 Computing
3 - STORAGE: DATA CAPACITY CALCULATIONS
Learning Intention I will learn how a computer stores graphics.
Chapter 3:- Graphics Eyad Alshareef Eyad Alshareef.
Data Representation.
Representing Images 2.6 – Data Representation.
Web Design and Development
Ch2: Data Representation
Summer Term Year 10 Slides
Computer Systems – Unit 1
Why use Binary? It is a two state system (on/off) which makes it simple to operate Even if degradation of current occurs (ie a slight drop in voltage)
Computer Systems.
Computer Systems Nat 4.5 Computing Science Data Representation
Option: Data Representation
Computer Systems Nat 4/5 Data Representation Lesson 4:
Option: Data Representation
Computer Systems Nat 4/5 Computing Science Data Representation
WJEC GCSE Computer Science
Presentation transcript:

National 4 and National 5 Computer Science

National 4 Computing Science 2 units: Software Design and Development Information System Design and Development 2 Outcomes for each unit Additional Value Unit

National 5 Computing Science 2 units: Software Design and Development Information System Design and Development 2 Outcomes for each unit Coursework Assessment (40%) Exam (60%)

Software Design and Development Topics include: How computers store information Program Design Programming How computers work

Information System Design and Development Topics include: Databases Websites (understanding and creating) Testing Hardware, Software, Storage and Networking Security Legal and Environmental Issues

Computing Science in Springburn Academy Topics from each unit (SDD and ISDD) will be taught in logical groups Outcomes will be completed after teaching and learning of related topic(s) AVU or Coursework sections will be completed after teaching and learning of related topic(s)

National 4 and National 5 Computer Science Low-level operations and computer architecture (SDD) Media Types (ISDD)

Low level operations and computer architecture National 4 Use of binary to represent and store: positive integers characters instructions (machine code) Units of storage (bit, byte, Kb, Mb, Gb, Tb, Pb) National 5 Translation of high-level program code to binary Comparison of interpreters and compilers Binary to represent positive integers Decimal Binary Floating point numbers ASCII Vector and Bitmap graphics Computer architecture components

Media Types National 4 Sound, graphics, video, text National 5 Standard file formats and their benefits: Text: txt, rtf Audio: wav, mp3 Graphics: jpeg, gif, png, svg Video: mp4, avi Factors affecting file size and quality File size for colour bitmaps Need for compression

Learning Intention I will learn how computers store numbers and how to convert them into decimal values

The two state machine Computers and storage devices (hard drives, USB flash drives, CD ROMS, DVDs) have components that only have two states:- On and Off 1 represents On 0 represents Off

The Decimal and Binary Systems We use the decimal or base 10 system in normal life: This means we have 10 digits: 0-9 Computers use the binary or base 2 system: There are two digits: 0 and 1 Each figure is known as a bit (binary digit) we don’t mean numbers with a dot (.) in them

Decimal Numbers Look at how a decimal number is made up: e.g = (2 x 100) + (7 x 10) + (3 x 1) Hundreds 10 3 = 100 Tens 10 2 = 10 Units 10 1 = 1 273

Binary Numbers The column heading for binary are:

Converting Binary to Decimal Lets look at how 173 is stored in binary: = (1 x 128) + (1 x 32) + (1 x 8) + (1 x 4) + (1 x 1) = =

Steps to convert from Binary to Decimal 1.Write the binary column headings 2.Write the binary number below the headings 3.Add the column headings that have a 1: =

Try these: Convert from Binary to Decimal: =8+4+2=14 = =43 = =121

Success Criteria I know how computers store numbers and can convert from binary to decimal.

Learning Intention I will learn how to convert from decimal into binary.

Converting Decimal to Binary Let’s look at how to write the decimal value 145 in binary: = =

Steps to convert from Decimal to Binary E.g. for the Decimal number 89 1.Write the column headings 2.Is the column heading 128 bigger than the number you want to convert? Yes put a 1. No put a

Steps to convert from Decimal to Binary (cont) E.g. for the Decimal number 89 3.Is the column heading 64 bigger than the number you want to convert? Yes put a 1. Subtract 64 from number: 89 – 64 =

Steps to convert from Decimal to Binary (cont) E.g. for the Decimal number 89 4.Is the column heading 32 bigger than the number you want to convert? (currently 23) No put a 0. 5.Repeat the process for 16,8,4,2 and

Steps to convert from Decimal to Binary (cont) E.g. for the Decimal number 89: 128 – No, 64 – Yes: 89 – 64 = 23, 32 – No, 16 – Yes: 23 – 16 = 7, 8 – No, 4 – Yes: 7 – 4 = 3, 2 – Yes: 3 – 2 = 1, 1 – Yes: 1 – 1 =

Try these: Convert from Decimal to Binary:

Success Criteria I can convert from decimal into binary.

Learning Intention I will learn how computers store real numbers

Storing real numbers Computers need to be able to store real numbers, not just whole numbers These are stored using floating point representation. In maths you would store a number in base 10 such as as follows in standard form: x 10 2 m x 10 e mantissa exponent

Storing real numbers (cont) Computers store floating point numbers using a mantissa and exponent too m x 2 e 1.First convert the decimal number into binary. E.g

Storing real numbers (cont) 2.Then need to move the number right: = x 2 5 = x is 5 in binary So decimal is in binary mantissa exponent

Storing real numbers (cont) Using mantissa and exponent to store floating point numbers: Advantage – extremely large and extremely small numbers can be stored using small number of bits Disadvantage – stored number not 100% accurate as mantissa is rounded off

Success Criteria I can describe how computer store real numbers.

Learning Intention I will learn how computers store text

Storing Text Computers use binary to store characters A character is a letter, number or symbol from the keyboard. Characters include: digits (0-9) – numeric characters letters (A-Z,a-z) – alphabetic characters punctuation (,. etc) – special characters

Storing Text (cont) A computer needs to be able to represent all the characters we want to use. The list of all characters a computer can process and store is called the character set. Each character is given a unique code number.

Storing Text (cont) Most popular form of code is ASCII (ask-eee) – American Standard Code for Information Interchange. ASCII is a 7 bit code Uses 2 7 different codes = 128 different codes. E.g = 65 = A = 66 = B If more codes are needed then 2 8 different codes are used by extended ASCII. This allows codes for characters such as ©, ë, ½

Storing Text (cont) 128 (or even 256) characters is not enough to include the characters from languages such as Japanese Unicode character set used to store these The first 128 characters in Unicode are the same as first 128 characters in ASCII 16 bit Unicode can store (2 16 ) characters

Success Criteria I can convert from text to binary and vice-versa.

Learning Intention I will learn how to represent computer memory sizes using the correct units.

Units of Storage A single bit can store either a 0 or a 1 Storing more data, like a document or a song takes thousands or millions of bits. How much storage does your mobile phone have?

Units of Storage (cont) bit = a single 0 or 1 byte = 8 bits Kilobyte (Kb) = 1024 bytes Megabyte (Mb) = 1024 Kilobytes Gigabyte (Gb) = 1024 Megabytes Terabyte (Tb) = 1024 Gigabytes Petabyte (Pb) = 1024 Terabytes Why 1024 and not 1000? 1024 = 2 10

Units of Storage (cont) Real Names bits bytes Kilobytes (Kb) Megabytes (Mb) Gigabytes (Gb) Terabytes (Tb) Petabytes (Pb) Memory Aid Big Boys Kicked My Granny Twice Punks

Units of Storage (cont) bits bytes Kilobytes (Kb) Megabytes (Mb) Gigabytes (Gb) Terabytes (Tb) Petabytes (Pb) ÷

Units of Storage (cont) bits bytes Kilobytes (Kb) Megabytes (Mb) Gigabytes (Gb) Terabytes (Tb) Petabytes (Pb) x

How many? How many bits in 4 bytes? How many bytes is 1024 bits? How many kilobytes in 2 megabytes?

Worked Example #1 A sports tracker wristband has 2 Megabytes of memory. How many bits of information can it store? 2 Megabytes = 2,048 kilobytes (2 x 1024) = 2,097,152 bytes (2048 x 1024) = 16,777,216 bits (2,097,152 x 8)

Worked example #2 My smartphone has a memory size of 16,777,216 Kilobytes. How many Gigabytes is this? 16,777,216 Kilobytes = 16, 384 Megabytes = 16 Gigabytes /1024

Worked example #3 A 5 minute mp3 song file is 13,260,000 bytes in size. How many Megabytes is this? 13,260,000 bytes = 12, Kilobytes = Megabytes /1024

Units of Storage (cont) bit 8 byte 1024 Kilobyte (Kb) 1024 Megabyte (Mb) 1024 Gigabyte (Gb) 1024 Terabyte (Tb) 1024 Petabyte (Pb) x ÷

Success Criteria I can convert computer storage sizes into the appropriate units of measurement.

Extension Task Create a PowerPoint presentation which has one slide for each of the units (bit, byte etc) details that unit in relation to the smaller unit next to it (i.e. byte = 8 bits, kilobyte = 1024 bits) includes some details about what you could store using that amount of space (e.g. If you had only 1 KB of memory what could you do with it?)

Starter Task Complete the worksheet on your desk.

Learning Intention I will learn how a computer stores graphics

Computer Graphics Computers graphics on the screen are made up of tiny dots called pixels (picture element) Computers store graphics in two different ways – either as vector graphics or as bitmap graphics.

Vector Graphics Vector graphics are made up of lots of overlapping shapes. Each shape can be edited independently from the other shapes.

Storing Vector Graphics Vector graphic files are stored by storing attributes (or qualities) about each of the shapes in the picture. E.g. for the rectangle in this image: Length Breadth Edge colour Edge thickness Fill colour Start X, Start Y Rotation

Storing Vector Graphics (cont) Overlapping vector graphics objects can be separated again. When you save a vector graphics file, only the objects are saved, not the whole page. Vector graphic files are small in size.

Bitmap Graphics Bitmap graphics are made up of lots of individual pixels.

Bitmap Graphics A bitmap image stores details for every individual pixel Can change an individual pixel at a time Look at this black and white image: 0 stored for white. 1 stored for black. Each black and white pixel takes 1 bit of storage.

Resolution Resolution is the name given the amount of pixels that the image is made of Also used to describe the number of pixels displayed on the screen Higher resolution = clearer and more detailed picture = larger file size 8 x 8 16 x 16

Vector Graphics – Pros and Cons Advantages Do not lose quality when scaled Require less storage space Objects are easily moved/manipulated Disadvantages Cannot be edited at pixel level Cannot show photo realistic scenes Usually require specialist applications to open the files

Bitmap Graphics – Pros and Cons Advantages Can edit pixel by pixel Can represent photo-realistic scenes Wide array of graphic effects can be applied Disadvantages Image becomes jagged when scaled Large file size

Success Criteria I can describe how vector and bitmap graphics are stored.

Learning Intention I will learn how to calculate the storage space required for black and white bitmaps

Calculating Bitmap Graphics Storage Black and White Each pixel in a black and white image needs 1 bit of storage. Steps to calculate storage space required: 1.Amount of pixels wide x Amount of pixels high (this answer is in bits) 2.Convert the number of bits into the appropriate units (Kilobytes, Megabytes – divide until appropriate)

Calculating Bitmap Graphics Storage Black and White – Example How much storage space is required to store a black and white image which is 800 pixels by 900 pixels? Step 1: width x height = 800 * 900 = 720,000 bits Step 2: 720,000/8 = 90,000 bytes 90,000/1024 = Kilobytes

Calculating Bitmap Graphics Storage Black and White – try it 1.How much storage space is required to store a black and white High Definition image which is 1920 pixels by 1080 pixels? 1920 x 1080 = bits /8 = bytes /1024 = kilobytes

Calculating Bitmap Graphics Storage Black and White – Alternative Question Sometimes you will be told the image size and the resolution of the image. e.g. image is 5 inches by 5 inches and has a resolution of 200 dpi. DPI = Dots Per Inch = amount of pixels across one inch of the image 200 pixels (or dots) 1 inch square 200 pixels (or dots)

Calculating Bitmap Graphics Storage Black and White – try it How much storage space is required to store a black and white image 3 inches by 4 inches with a resolution of 250dpi (dots per inch)? (3 x 250) x (4 x 250) = bits /8 = bytes / 1024 = kilobytes

Success Criteria I can calculate the storage requirements for a black and white bitmap image

Learning Intention I will learn how to calculate the storage space required for colour bitmap images

Calculating Bitmap Graphics Storage Colour Black and white image = two colours = 1 bit per pixel as 2 1 = 2 More than 1 bit is allocated to each pixel for colour images: 2 bits/pixel = 2 2 = 4 colours 3 bits/pixel = 2 3 = 8 colours 4 bits/pixel = 2 4 = 16 colours 8 bits/pixel = 2 8 = 256 colours

Calculating Bitmap Graphics Storage Colour (cont) Number of bits allocated to each pixel is known as the bit depth. An image with 16 bit colour depth could have different colours (2 16 ) True colour 24 bit colour depth: 2 24 = 16,777,216 colours 8 bits for each of Red, Green and Blue (RGB)

Increasing Bit Depth / Colour Depth Higher Bit Depth = More Colours But file size increases

Calculating Bitmap Graphics Storage Colour – Example How much storage space is required to store a colour image which is 400 pixels x 300 pixels and has a colour depth of 16? Step 1: width x height x colour depth = [resolution] x colour depth = [400 x 300] x 16 = 1,920,000 bits Step 2: 1,920,000/8 = 240,000 bytes 240,000/1024 = Kilobytes

Calculating Bitmap Graphics Storage Sometimes you will be told the image size and the resolution of the image. e.g. image is 5 inches by 5 inches and has a resolution of 200 dpi. DPI = Dots Per Inch = amount of pixels across one inch of the image 200 pixels (or dots) 1 inch square 200 pixels (or dots)

Calculating Bitmap Graphics Storage Colour – try it 2.How much storage space is required to store a 10 bit colour image 3 inches by 4 inches with a resolution of 150dpi (dots per inch)? [resolution] x [bit depth] (3 x 150) x (4 x 150) x 10 = bits /8 = bytes / 1024 = kilobytes

Success Criteria I can calculate the storage requirements for a colour bitmap image.

Media Types Computers use a range of media or data types including sound (also called audio), graphics, video and text.

Media Types Multimedia is the presentation of information by a computer using these media types. Graphic, Video and Audio files can be very large in size so compression is needed.

Compression Compression reduces the size of files and therefore reduces the time to transfer them across networks.

Types of Compression Lossless (no loss) compression does not affect the quality of the file Lossy compression:- results in a file of poorer quality than the original results in smaller files than lossless compression Can result in artefacts (flaws) appearing in JPEGs

Artefacts – flaws due to compression

Standard File Formats Standard File Formats are used to store files so that the files can be used in a different application package from the one which created it.

Text Files – TXT (Text) Used to store a plain text file. TXT files store an ASCII code for each character TXT files contain no formatting information e.g. bold, italic, font, alignment etc

Text Files – RTF (Rich Text Format) A complex format used to store data from a word processing application. Can be used to transfer data between different word processing applications without losing the format. Stores text data and formatting information e.g. bold, italic, alignment, font

Starter Questions Discuss with your neighbour and be ready to answer if asked to: 1.Describe two factors which affect the file size of a colour image? 2.What is lossy compression? 3.What is lossless compression?

Graphics Files - BMP Windows Bit-Mapped image file format Files are large – no compression Colour depth between 1 and 64 bits 24-bit colour depth most common (16.7 million colours)

Graphics Files – GIF Graphics Interchange Format Compressed using lossless compression GIF files may be interlaced – low quality version can be shown while rest of file downloads

Graphics Files – GIF (cont) Supports animation - multiple images in one GIF file Supports one transparent colour Colour depth of 8-bit (256 colours) Good for cartoon like images

Graphics Files - JPEG Joint Photographic Expert Group Lossy compression – amount of compression is adjustable – allows higher quality but takes more storage JPEG format good for natural real life images Does not support transparency or animation Supports 16.7 million colours (24-bit colour depth)

Graphics Files – PNG Portable Network Graphics Includes all the advantages of GIFs but without the limitations Uses lossless compression Up to 48 bit colour depth Allows partial transparency

Graphics Files – SVG Scalable Vector Graphics Stores objects as a list of attributes e.g. fill, x1, y1, colour No compression Does not lose quality when scaled Supports layers

How Audio is stored Microphone used to capture sound Computer regularly measures the amplitude (change over time) of the sound wave and stores this in a file

Audio - Sampling Rate Sound is analogue Computer system changes it to a digital signal by sampling (measuring the sound wave and storing the measurement as a digital number) The sampling rate is the number of times per second that the sound wave is measured CD quality sound is sampled at 44.1KHz = 44,100 time per second

Audio - Sampling Rate Higher sampling rate = better quality sound = bigger file size

Audio Files - WAV WAVeform audio file format WAV is the standard format for storing sound files on Windows systems. Uncompressed, therefore large file size Used for high quality sound

Audio Files – MP3 Created by Motion Pictures Expert Group MP3 is a file format for compressing sounds CD quality sound Uses lossless compression – compresses file but keeps quality removes sound human ears cannot hear quiet sounds when a loud sound happens at the same time file size reduced to 10% of original size

Factors Affecting Sound File Size Length of sound file (number of seconds) Sampling rate

Video – MP4 Motion (Moving) Picture Expert Group MPEG is a container file – contains both audio and video MP4 uses lossy compression to reduce file size

Video – AVI Audio Video Interleave AVI is a container file No compression so files are large Usually associated with Windows computer systems

Factors affecting video file size Video resolution Bit depth (# of colours) of video Length of video (seconds) Frames per second (fps)

PDF (Portable Document Format) Developed by Adobe – open standard in 2008 Allows sharing documents independently of application software, hardware and operating system PDF files can contain text, graphics, video, audio and clickable links

Success Criteria I can describe the different standard file formats, why we use standard file formats and the factors affecting size and quality