
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
Earth's Layers
Presentation
•
9th Grade
14 questions
Simplifying Expressions with Like Terms
Presentation
•
9th Grade
15 questions
Agreement and Disagreement
Presentation
•
9th Grade
15 questions
The Geographers Tools
Presentation
•
9th Grade
15 questions
ACT Prep
Presentation
•
9th Grade
15 questions
Evaluating Expressions
Presentation
•
9th Grade
15 questions
Atomic Bomb WWII
Presentation
•
9th Grade
15 questions
Characterization
Presentation
•
9th Grade
Popular Resources on Wayground
20 questions
"What is the question asking??" Grades 3-5
Quiz
•
1st - 5th Grade
20 questions
“What is the question asking??” Grades 6-8
Quiz
•
6th - 8th Grade
10 questions
Fire Safety Quiz
Quiz
•
12th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
34 questions
STAAR Review 6th - 8th grade Reading Part 1
Quiz
•
6th - 8th Grade
20 questions
“What is the question asking??” English I-II
Quiz
•
9th - 12th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
47 questions
8th Grade Reading STAAR Ultimate Review!
Quiz
•
8th Grade
Discover more resources for Computers
20 questions
“What is the question asking??” English I-II
Quiz
•
9th - 12th Grade
10 questions
Fire Prevention
Quiz
•
9th - 12th Grade
24 questions
BIOLOGY STAAR REVIEW
Quiz
•
9th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
30 questions
English 1 STAAR Review
Quiz
•
9th Grade
46 questions
Linear and Exponential Function Key Features
Quiz
•
9th Grade
20 questions
Grammar
Quiz
•
9th - 12th Grade
30 questions
Biology STAAR Review #3
Quiz
•
9th Grade