
File Sizes
Presentation
•
Computers
•
9th Grade
•
Practice Problem
•
Hard
Adam Campbell
Used 3+ times
FREE Resource
11 Slides • 9 Questions
1
Calculating File Size
2
Do Now
List units of memory
Order the units of memory from smallest to largest
Show how to convert between units ie. KiloBytes to MegaBytes
3
Calculating file sizes
Text Files
One character of text takes up 8 bits (1 byte) of storage space.
This includes letters, numbers, spaces and symbols. So the sentance:
"Computer Science is Awesome!"
Uses 28 characters.
The file size is therefore 28*8 bits. (or 28*1 bytes).
If you calculate a size in bits (28*8=224 bits), could can divide this by 8 to convert bits to bytes (224 / 8 = 28 bytes)
4
Multiple Choice
Calculate the size of a text file that contains the following text:
"Lord Lawson of Beamish Academy"
5
Multiple Choice
Calculate the file size of a text file that contains the text:
"I am amazing!!!"
6
Multiple Choice
What is the file size in bits of the following text:
"Incredible"
80 bits
10 bytes
7
Fill in the Blanks
Type answer...
8
Image Files
To work out the size of an image file
Work out the number of pixels by multiplying the width (in pixels) by the height (in pixels) THEN multiply by the bits per pixel (number of binary digits used to represent a colour.
ie. An image that is 64 x 64 pixels, and uses 4 bit colour
64 x 64 x 4 = 16,348 bits
You can divide this by 8 to convert to bytes
16,348 / 8 = 2,048
Divide by 1000 (or 1024) to get an answer in kilobytes
2,048 / 1024 = 2kB
9
Multiple Choice
An image is 10 pixels wide and 6 pixels tall. It uses 2 bit colour. How big is the file?
10
Database File Size
A database has many different fields
You need to work out how much space one entry for each field will use
Then you multiply the answer by how many records (entries in the database) there are
11
Database File Size
A text field is worked out the same way as a text file
ie. Storing a name in text in 10 characters = 10 bytes
Storing a number less than 255 uses 8 bits/1 byte
Storing a boolean uses 1 bit
12
Database File Size
If a database has the following fields:
Name (17 characters)
Age (number < 255)
Address (20 characters)
Then storing this information for 1 entry is
17 + 1 + 20 = 38 bits
If there are 200 records (entries) then the file size is
38 * 2000 = 76,000 bits
Divide by 8 to convert to bytes = 76,000/8 = 9500 bytes
Divide by 1000 to convert to kilobytes = 9500 / 1000 = 9.5kB
13
Multiple Choice
A database stores the following fields, and has 100 records.
Name (15 characters)
Age (number < 255)
Test Score (number < 255)
What is the file size in bytes?
1700 bytes
14
Multiple Choice
A database stores the following fields, and has 200 records
Book Name (30 characters)
Book Price (number < 255)
Quantity in stock (number < 255)
Author (20 characters)
What is the file size in kilobytes?
15
Sound Files
Calculating the File Size
For a sound file you will be provided with it's duration in seconds, it's bit depth (number of bits per sample), sample rate (how many sounds it makes per second), and number of channels (how many different sounds can be made at once.
To calculate the file size, you multiple all of these together.
16
Sound File Example
A sound file uses a bit depth of 10
There are 2 channels
The sample rate is 1000
The duration is 1 minute (60 seconds)
The file size is:
10 x 2 x 1000 x 60 = 1,200,000 bits
1,200,000 / 8 = 150,000 bytes
150,000 / 1000 = 150 kB
17
Sound File Example
A sound file uses a bit depth of 16
There is 1 channel
The sample rate is 16,100
The duration is 3 minutes (180 seconds)
The file size is:
16 x 1 x 16,100 x 180 = 46,368,000 bits
46,368,000 / 8 = 5,796,000 bytes
5,796,000 / 1000 = 5,796 kB
5,796 / 1000 = 5.8 MB
18
Multiple Choice
A sound file uses a bit depth of 2, has 2 channels, has a sample rate of 20, and lasts for 10 seconds. What is it's file size in bytes?
19
Multiple Choice
A sound file has a bit depth of 4, a sample rate of 100, a duration of 200 seconds, and 2 channels. What is the file size in kB?
200 kB
20 kB
20
Task
Create a presentation
In your presentation explain how to calculate the file sizes for:
Text Files
Databases
Image Files Include examples
Sound Files
Calculating File Size
Show answer
Auto Play
Slide 1 / 20
SLIDE
Similar Resources on Wayground
15 questions
Causes of WWI
Presentation
•
9th Grade
14 questions
TED-Ed: The Great Wall of China
Presentation
•
9th Grade
14 questions
Punic Wars & Republic to Empire!
Presentation
•
9th Grade
16 questions
Subject Verb Agreement
Presentation
•
9th Grade
16 questions
The Theory of Evolution
Presentation
•
8th Grade
15 questions
Logic Gates
Presentation
•
9th Grade
16 questions
CSS
Presentation
•
9th Grade
15 questions
Cell Transport - Active Transport
Presentation
•
9th Grade
Popular Resources on Wayground
6 questions
Secondary Safety Quiz
Presentation
•
9th - 12th Grade
10 questions
MyPath Diagnostic Overview
Presentation
•
6th - 8th Grade
20 questions
Lab Safety Quiz
Quiz
•
6th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Adding and Subtracting Decimals
Quiz
•
5th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
21 questions
Lab Safety
Quiz
•
10th Grade
Discover more resources for Computers
20 questions
Early Computing
Quiz
•
7th - 12th Grade
20 questions
Module 1 Topic 1 Vocabulary
Quiz
•
9th - 12th Grade
10 questions
Exploring Computer Hardware and Software Components
Interactive video
•
6th - 10th Grade
14 questions
Introduction to Digital Citizenship
Quiz
•
9th Grade
39 questions
Safety Review
Quiz
•
9th - 12th Grade
20 questions
Digital Citizenship
Quiz
•
8th - 12th Grade
25 questions
OSHA and Lab Safety
Quiz
•
9th Grade
22 questions
Electronic Computing
Quiz
•
8th - 12th Grade