IGCSE Computer Science 2023-25 - (1) Data Representation - 1.3(a) data storage and compression — Transcript
Full transcript
- 0:01welcome back to the next video for igcse
- 0:03computer science
- 0:05um we're still on chapter one data
- 0:07representation
- 0:08um but we're at the end of this chapter
- 0:10and we're going to be looking at data
- 0:11storage and file compression i've broken
- 0:14this final part into two sections
- 0:18um the first section we're going to be
- 0:20um looking at how data storage is
- 0:22measured
- 0:23um megabytes gigabytes terabytes so on
- 0:25and so forth and we're going to be
- 0:27looking at how we can calculate file
- 0:29sizes of an image file and the sound
- 0:31file using the information
- 0:34we've been given so
- 0:36i use this in class
- 0:37um
- 0:38so use the analogy baby shark and the
- 0:41song baby shark
- 0:43because we've got a bit
- 0:45um which is the basic unit of all
- 0:46computing memory storage terms and it
- 0:48can be either be if we consider it to be
- 0:51a binary digit it's either a one or a
- 0:53zero so this
- 0:54is a bit and i'll link this to the baby
- 0:57shark
- 0:59the next one up or the
- 1:01daddy shark rather is eight of these
- 1:04bits
- 1:05um
- 1:06which is called a bite
- 1:08the bite is the smallest unit of memory
- 1:11in a computer
- 1:12one byte of course equals eight bits
- 1:15um and the one in between mummy shark
- 1:18is halfway between a bit and a byte and
- 1:21this is four bits of information and
- 1:23this would be considered to be or called
- 1:26a nibble
- 1:27so we've got a bit
- 1:29baby shark we've got a nibble mummy
- 1:31shark and we've got a bite
- 1:34daddy shark
- 1:37[Music]
- 1:39now we can look at um file sizes in two
- 1:41different ways the first method we can
- 1:43use the um used entry values
- 1:46so for example a kilobyte would equal a
- 1:48thousand bytes one kb
- 1:51and we multiply that by a thousand and
- 1:52we get one megabyte
- 1:54multiply again by a thousand a gigabyte
- 1:57and we go up in thousands every time so
- 1:59from a gigabyte to a terabyte to a per
- 2:02byte to an exabyte and as you can see
- 2:05each time we've added three zeros on the
- 2:08end of each one
- 2:09to get the relevant value so we're
- 2:11dealing with lots and lots and lots and
- 2:13lots of zeros
- 2:15now the other way
- 2:16um we're going to the power of two to
- 2:19the power so
- 2:20for and in the book and this i've never
- 2:23seen this before but this is interesting
- 2:26um we're going to use the iec the
- 2:28international
- 2:30electro technical commission memory
- 2:32storage method based on the binary
- 2:34system
- 2:35so let's say 2 to the power 10 to the
- 2:37power 20 and so on and so forth but
- 2:40we've changed the name it's no longer a
- 2:41kilobyte and i don't know whether this
- 2:43is for the benefit of igcse or what but
- 2:46we're going um we're basing this on kibi
- 2:48bytes
- 2:50so one cubic byte is 2 to the power 10
- 2:54so 2 times 2 times 2 times 2 times 2
- 2:58times 2 times 2 times 2 times 2 times 2
- 3:01times 2 to get 1024 bytes
- 3:05one megabyte is 2 to the 20.
- 3:08a gigabyte would be 2 to the 30 and
- 3:11we're going up each time
- 3:13so right up to an exabyte which would be
- 3:152 to the power 60
- 3:18as you can see there we've got a lot of
- 3:20a very very very big number
- 3:22so that's the two different methods
- 3:24now
- 3:25the old way when you were showing out
- 3:26you're working out when you were doing
- 3:28calculations based on this you could do
- 3:30it either way i'm not sure what the exam
- 3:33board are expecting now
- 3:38we'll have to wait and see and watch
- 3:39this space on that
- 3:42so now that we know about the different
- 3:44um
- 3:44file sizes and be that
- 3:47going up in
- 3:48kilobytes or cubic bytes we need to
- 3:52be able to establish how we can do
- 3:54calculations
- 3:56on bitmap images and on sound sample
- 3:59some sound files
- 4:01so in the first instance
- 4:03we're going to look at um
- 4:04cutting the size of an image and this is
- 4:07based on the image resolution i the
- 4:10number of pixels the image has
- 4:12and the image the pixel matrix which
- 4:15i'll come on to in a moment
- 4:16and
- 4:17we multiply that by the color depth
- 4:20in bits
- 4:22um
- 4:23for a sound file
- 4:26and this is for a mono sound file
- 4:29we use the sample rate
- 4:32the number in hertz and we multiply that
- 4:34by the sample resolution which is
- 4:36measured in bits and then we times that
- 4:39by the length of the sample which of
- 4:41course is measured in seconds how long
- 4:43it will be
- 4:45if we want to turn this into stereo
- 4:46sound which generally we would do
- 4:49we will multiply the entire thing by 2.
- 4:55so i have an example here um three
- 4:57pictures of a tree frog one in 24 bit um
- 5:0216 million colors 8-bit 256 colors and
- 5:05finally a 4-bit which would give us 16
- 5:07colors
- 5:08so three different versions of the same
- 5:10image
- 5:13now if we were to guestimate that this
- 5:17image was
- 5:18250 by 300 pixels
- 5:21in dimensions
- 5:22um that would give us a total
- 5:27pixel matrix so multiply on the x-axis
- 5:31by the y-axis
- 5:32by 7 to 75 000 pixels
- 5:36okay we then would multiply that by the
- 5:38color depth
- 5:40so if we were to say it was um
- 5:43multiplied by 24 bits we'd get a value
- 5:46of
- 5:471.8 million bits
- 5:50if we were to
- 5:52times it by eight
- 5:54256 colors we would get six hundred
- 5:57thousand bits and then if we multiply it
- 6:00by four seventy five thousand multiply
- 6:01by four we would get three hundred
- 6:03thousand bits
- 6:04um to cut to work that into bytes we
- 6:07would divide that number by eight
- 6:09because of course there are eight bits
- 6:11in one byte
- 6:15for the last part of this video i want
- 6:16to go through a few exam questions
- 6:19which you might crop up
- 6:21on your exam
- 6:23so first of all we're going to look at
- 6:24measuring the size of an image
- 6:26so exam
- 6:28example exam question one
- 6:30a photograph
- 6:32is 1024
- 6:34by 1080 pixels and it uses a color depth
- 6:38of 32 bits
- 6:40how many photographs of this size would
- 6:42fit onto a memory stick
- 6:45of 64
- 6:47gb bytes
- 6:49okay we've put the i in between so it
- 6:51must be bites
- 6:53so first of all job number one we
- 6:55multiply the number of pixels in
- 6:56vertical and horizontal directions x and
- 6:59y axis to find the total number of
- 7:01pixels so that would give us a number of
- 7:03one one zero five nine
- 7:05two zero pixels
- 7:08we then we multiply the number of pixels
- 7:10by the color depth
- 7:12um and then divide by eight to give the
- 7:15total number of buys so
- 7:18one million one hundred and five
- 7:20thousand nine hundred and twenty
- 7:21multiplied by thirty two
- 7:24give us that number there divide that by
- 7:25eight would give us a total
- 7:28of
- 7:29four million four hundred and twenty
- 7:30three thousand six hundred and eighty
- 7:34total bytes
- 7:36um to calculate how it would go on to a
- 7:4064
- 7:41gigabyte drive we first will take 64
- 7:45and we multiply it by 1024
- 7:49and then which would give us
- 7:51go and bias to kilobytes
- 7:54multiply again by 1024 which would give
- 7:56us megabytes
- 7:58multiply again by 1024 which would give
- 8:01us um the gibby byte
- 8:04um example so that would be again
- 8:06another massive number starting with 687
- 8:08bytes
- 8:10so finally we take that number
- 8:13and we
- 8:14find that we divide the memory stick
- 8:15size by the file size so we'll take that
- 8:19original number divide it by 44
- 8:23423
- 8:24168
- 8:26and we could see we can store
- 8:2915
- 8:31534 photographs lots and lots of big
- 8:34numbers now one thing that the students
- 8:37always ask and i do not know whether
- 8:40this will be the case or even whether
- 8:42these um sort of questions
- 8:44all be these are example past paper
- 8:47questions will be on the paper because
- 8:49it does say
- 8:50that students are not allowed to use a
- 8:52calculator on either paper 1 or paper 2
- 8:55now
- 8:56so i don't know what's going to happen
- 8:57there
- 8:59but that is basically how you would
- 9:00calculate
- 9:03now the second example probably slightly
- 9:05easier
- 9:07example um exam question two
- 9:11we have a digital camera
- 9:12and it has an array
- 9:14of 2048 by 2048 pixels basically the
- 9:19x-axis is 2048 so it's the y axis the
- 9:22grid matrix and uses a color depth of 16
- 9:26or 16 bit color depth
- 9:28find the size of an image taken by this
- 9:31camera in
- 9:33maybe buys
- 9:35multiply
- 9:36number of pixels in vertical and
- 9:38horizontal directions to find out the
- 9:39total number of pixels well there we go
- 9:41we've got
- 9:43494
- 9:45304 pixels
- 9:49now multiply
- 9:51the number of pixels by the color depth
- 9:53so we times that by 16.
- 9:55so
- 9:5667 million
- 9:58just over
- 10:00now we divide the number of bits
- 10:03six seven million bits we divide that by
- 10:06um by eight to get the number of bytes
- 10:08so there we go we've got eight uh
- 10:10million three hundred and eighty eight
- 10:12thousand six hundred and eight bytes
- 10:15and then
- 10:17and then finally we need to convert the
- 10:18number of bytes we have the 83.8 million
- 10:22and we need to convert those bytes into
- 10:25um maybe bytes
- 10:28so if you remember from last time we're
- 10:30moving up in thousands
- 10:32so
- 10:34we go from bytes to kilobytes to
- 10:37megabytes
- 10:38so to do this we need to multiply 1024
- 10:42by 1024
- 10:44to give us a total of
- 10:46one
- 10:48um just over one million one million
- 10:50forty eight thousand five hundred and
- 10:52seventy eight
- 10:53and we're going to divide our original
- 10:55total our number of bytes
- 10:57by that figure
- 10:59so 83.8
- 11:01million divided by just over a million
- 11:03and we will end up with a final total of
- 11:06eight
- 11:07maybe buys
- 11:11now for the final one final question i'm
- 11:13going to move on to sound
- 11:16so
- 11:17we've got an audio cd
- 11:19um
- 11:20again these don't really exist anymore
- 11:22but it's how we used to store and how we
- 11:24used to buy um buy songs buy music back
- 11:27in the day
- 11:28so we have an audio cd
- 11:30and it has a sample rate of 44 100
- 11:34and a sample resolution
- 11:36of 16 bits
- 11:38let's wait for the ambulance to go past
- 11:40the music being sampled uses two
- 11:41channels stereo to allow for stereo
- 11:44recording calculate the file size for a
- 11:4760 minute recording
- 11:49okay so 60 minutes of music going onto
- 11:52that cd
- 11:54so
- 11:55the size of the file remember the
- 11:57calculation from before the sample rate
- 11:59in hertz times the sample resolution in
- 12:01bits times the length of the sample in
- 12:03seconds so we've got the value in hertz
- 12:0644 100 we've got 16 bits for the sample
- 12:09resolution
- 12:10and we've got 60 minutes of sampled
- 12:13recording
- 12:14so let's have a look at this
- 12:17the size of the sample would be 44 100
- 12:20times 16
- 12:21times 60
- 12:23times 60 again because remember we're
- 12:25working in
- 12:26um
- 12:27this it says
- 12:2860
- 12:29minutes but we need to get into 60
- 12:31seconds
- 12:32so we've got a total value there in bits
- 12:35um
- 12:36a giant number
- 12:39multiply that again by two
- 12:41to get an even bigger number um in terms
- 12:44of number of bits for a stereo recording
- 12:48and then divide by eight
- 12:50to get the number of bytes
- 12:54and then divide by 1024 by 1024 to
- 12:57convert that
- 12:59into megabit mega uh midi bits
- 13:02so we end up with um 60 minutes of
- 13:04recorded sound at that sample rate using
- 13:07that simple resolution would give us a
- 13:10total
- 13:11um
- 13:13file size total sound size of 605
- 13:17maybe bytes
- 13:21and that is it that's the end of this
- 13:22video um i did say at the beginning it
- 13:25is
- 13:26part one of um of two parts to sort of
- 13:29end the um data representation series so
- 13:32in the next video we're going to move on
- 13:34to understand the purpose and need for
- 13:36data compression and then we're going to
- 13:38be looking at lossy and loss and
- 13:40lossless compression techniques so
- 13:43thank you very much for watching please
- 13:45if you haven't already please subscribe
- 13:47so i can continue making these videos i
- 13:50hope you've enjoyed it hope you've
- 13:51learned something from it and i will see
- 13:53you next time thank you very much indeed
About this transcript
This page contains the full transcript of IGCSE Computer Science 2023-25 - (1) Data Representation - 1.3(a) data storage and compression by Mr Bulmer's Learning Zone, generated from the public captions YouTube serves with the video. The transcript has 2,066 words across 370 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.