YouTube2Text

IGCSE Computer Science 2023-25 - (1) Data Representation - 1.3(a) data storage and compression — Transcript

by Mr Bulmer's Learning Zone · 2,066 words · 370 segments · language en · Watch on YouTube

Full transcript

  1. 0:01welcome back to the next video for igcse
  2. 0:03computer science
  3. 0:05um we're still on chapter one data
  4. 0:07representation
  5. 0:08um but we're at the end of this chapter
  6. 0:10and we're going to be looking at data
  7. 0:11storage and file compression i've broken
  8. 0:14this final part into two sections
  9. 0:18um the first section we're going to be
  10. 0:20um looking at how data storage is
  11. 0:22measured
  12. 0:23um megabytes gigabytes terabytes so on
  13. 0:25and so forth and we're going to be
  14. 0:27looking at how we can calculate file
  15. 0:29sizes of an image file and the sound
  16. 0:31file using the information
  17. 0:34we've been given so
  18. 0:36i use this in class
  19. 0:37um
  20. 0:38so use the analogy baby shark and the
  21. 0:41song baby shark
  22. 0:43because we've got a bit
  23. 0:45um which is the basic unit of all
  24. 0:46computing memory storage terms and it
  25. 0:48can be either be if we consider it to be
  26. 0:51a binary digit it's either a one or a
  27. 0:53zero so this
  28. 0:54is a bit and i'll link this to the baby
  29. 0:57shark
  30. 0:59the next one up or the
  31. 1:01daddy shark rather is eight of these
  32. 1:04bits
  33. 1:05um
  34. 1:06which is called a bite
  35. 1:08the bite is the smallest unit of memory
  36. 1:11in a computer
  37. 1:12one byte of course equals eight bits
  38. 1:15um and the one in between mummy shark
  39. 1:18is halfway between a bit and a byte and
  40. 1:21this is four bits of information and
  41. 1:23this would be considered to be or called
  42. 1:26a nibble
  43. 1:27so we've got a bit
  44. 1:29baby shark we've got a nibble mummy
  45. 1:31shark and we've got a bite
  46. 1:34daddy shark
  47. 1:37[Music]
  48. 1:39now we can look at um file sizes in two
  49. 1:41different ways the first method we can
  50. 1:43use the um used entry values
  51. 1:46so for example a kilobyte would equal a
  52. 1:48thousand bytes one kb
  53. 1:51and we multiply that by a thousand and
  54. 1:52we get one megabyte
  55. 1:54multiply again by a thousand a gigabyte
  56. 1:57and we go up in thousands every time so
  57. 1:59from a gigabyte to a terabyte to a per
  58. 2:02byte to an exabyte and as you can see
  59. 2:05each time we've added three zeros on the
  60. 2:08end of each one
  61. 2:09to get the relevant value so we're
  62. 2:11dealing with lots and lots and lots and
  63. 2:13lots of zeros
  64. 2:15now the other way
  65. 2:16um we're going to the power of two to
  66. 2:19the power so
  67. 2:20for and in the book and this i've never
  68. 2:23seen this before but this is interesting
  69. 2:26um we're going to use the iec the
  70. 2:28international
  71. 2:30electro technical commission memory
  72. 2:32storage method based on the binary
  73. 2:34system
  74. 2:35so let's say 2 to the power 10 to the
  75. 2:37power 20 and so on and so forth but
  76. 2:40we've changed the name it's no longer a
  77. 2:41kilobyte and i don't know whether this
  78. 2:43is for the benefit of igcse or what but
  79. 2:46we're going um we're basing this on kibi
  80. 2:48bytes
  81. 2:50so one cubic byte is 2 to the power 10
  82. 2:54so 2 times 2 times 2 times 2 times 2
  83. 2:58times 2 times 2 times 2 times 2 times 2
  84. 3:01times 2 to get 1024 bytes
  85. 3:05one megabyte is 2 to the 20.
  86. 3:08a gigabyte would be 2 to the 30 and
  87. 3:11we're going up each time
  88. 3:13so right up to an exabyte which would be
  89. 3:152 to the power 60
  90. 3:18as you can see there we've got a lot of
  91. 3:20a very very very big number
  92. 3:22so that's the two different methods
  93. 3:24now
  94. 3:25the old way when you were showing out
  95. 3:26you're working out when you were doing
  96. 3:28calculations based on this you could do
  97. 3:30it either way i'm not sure what the exam
  98. 3:33board are expecting now
  99. 3:38we'll have to wait and see and watch
  100. 3:39this space on that
  101. 3:42so now that we know about the different
  102. 3:44um
  103. 3:44file sizes and be that
  104. 3:47going up in
  105. 3:48kilobytes or cubic bytes we need to
  106. 3:52be able to establish how we can do
  107. 3:54calculations
  108. 3:56on bitmap images and on sound sample
  109. 3:59some sound files
  110. 4:01so in the first instance
  111. 4:03we're going to look at um
  112. 4:04cutting the size of an image and this is
  113. 4:07based on the image resolution i the
  114. 4:10number of pixels the image has
  115. 4:12and the image the pixel matrix which
  116. 4:15i'll come on to in a moment
  117. 4:16and
  118. 4:17we multiply that by the color depth
  119. 4:20in bits
  120. 4:22um
  121. 4:23for a sound file
  122. 4:26and this is for a mono sound file
  123. 4:29we use the sample rate
  124. 4:32the number in hertz and we multiply that
  125. 4:34by the sample resolution which is
  126. 4:36measured in bits and then we times that
  127. 4:39by the length of the sample which of
  128. 4:41course is measured in seconds how long
  129. 4:43it will be
  130. 4:45if we want to turn this into stereo
  131. 4:46sound which generally we would do
  132. 4:49we will multiply the entire thing by 2.
  133. 4:55so i have an example here um three
  134. 4:57pictures of a tree frog one in 24 bit um
  135. 5:0216 million colors 8-bit 256 colors and
  136. 5:05finally a 4-bit which would give us 16
  137. 5:07colors
  138. 5:08so three different versions of the same
  139. 5:10image
  140. 5:13now if we were to guestimate that this
  141. 5:17image was
  142. 5:18250 by 300 pixels
  143. 5:21in dimensions
  144. 5:22um that would give us a total
  145. 5:27pixel matrix so multiply on the x-axis
  146. 5:31by the y-axis
  147. 5:32by 7 to 75 000 pixels
  148. 5:36okay we then would multiply that by the
  149. 5:38color depth
  150. 5:40so if we were to say it was um
  151. 5:43multiplied by 24 bits we'd get a value
  152. 5:46of
  153. 5:471.8 million bits
  154. 5:50if we were to
  155. 5:52times it by eight
  156. 5:54256 colors we would get six hundred
  157. 5:57thousand bits and then if we multiply it
  158. 6:00by four seventy five thousand multiply
  159. 6:01by four we would get three hundred
  160. 6:03thousand bits
  161. 6:04um to cut to work that into bytes we
  162. 6:07would divide that number by eight
  163. 6:09because of course there are eight bits
  164. 6:11in one byte
  165. 6:15for the last part of this video i want
  166. 6:16to go through a few exam questions
  167. 6:19which you might crop up
  168. 6:21on your exam
  169. 6:23so first of all we're going to look at
  170. 6:24measuring the size of an image
  171. 6:26so exam
  172. 6:28example exam question one
  173. 6:30a photograph
  174. 6:32is 1024
  175. 6:34by 1080 pixels and it uses a color depth
  176. 6:38of 32 bits
  177. 6:40how many photographs of this size would
  178. 6:42fit onto a memory stick
  179. 6:45of 64
  180. 6:47gb bytes
  181. 6:49okay we've put the i in between so it
  182. 6:51must be bites
  183. 6:53so first of all job number one we
  184. 6:55multiply the number of pixels in
  185. 6:56vertical and horizontal directions x and
  186. 6:59y axis to find the total number of
  187. 7:01pixels so that would give us a number of
  188. 7:03one one zero five nine
  189. 7:05two zero pixels
  190. 7:08we then we multiply the number of pixels
  191. 7:10by the color depth
  192. 7:12um and then divide by eight to give the
  193. 7:15total number of buys so
  194. 7:18one million one hundred and five
  195. 7:20thousand nine hundred and twenty
  196. 7:21multiplied by thirty two
  197. 7:24give us that number there divide that by
  198. 7:25eight would give us a total
  199. 7:28of
  200. 7:29four million four hundred and twenty
  201. 7:30three thousand six hundred and eighty
  202. 7:34total bytes
  203. 7:36um to calculate how it would go on to a
  204. 7:4064
  205. 7:41gigabyte drive we first will take 64
  206. 7:45and we multiply it by 1024
  207. 7:49and then which would give us
  208. 7:51go and bias to kilobytes
  209. 7:54multiply again by 1024 which would give
  210. 7:56us megabytes
  211. 7:58multiply again by 1024 which would give
  212. 8:01us um the gibby byte
  213. 8:04um example so that would be again
  214. 8:06another massive number starting with 687
  215. 8:08bytes
  216. 8:10so finally we take that number
  217. 8:13and we
  218. 8:14find that we divide the memory stick
  219. 8:15size by the file size so we'll take that
  220. 8:19original number divide it by 44
  221. 8:23423
  222. 8:24168
  223. 8:26and we could see we can store
  224. 8:2915
  225. 8:31534 photographs lots and lots of big
  226. 8:34numbers now one thing that the students
  227. 8:37always ask and i do not know whether
  228. 8:40this will be the case or even whether
  229. 8:42these um sort of questions
  230. 8:44all be these are example past paper
  231. 8:47questions will be on the paper because
  232. 8:49it does say
  233. 8:50that students are not allowed to use a
  234. 8:52calculator on either paper 1 or paper 2
  235. 8:55now
  236. 8:56so i don't know what's going to happen
  237. 8:57there
  238. 8:59but that is basically how you would
  239. 9:00calculate
  240. 9:03now the second example probably slightly
  241. 9:05easier
  242. 9:07example um exam question two
  243. 9:11we have a digital camera
  244. 9:12and it has an array
  245. 9:14of 2048 by 2048 pixels basically the
  246. 9:19x-axis is 2048 so it's the y axis the
  247. 9:22grid matrix and uses a color depth of 16
  248. 9:26or 16 bit color depth
  249. 9:28find the size of an image taken by this
  250. 9:31camera in
  251. 9:33maybe buys
  252. 9:35multiply
  253. 9:36number of pixels in vertical and
  254. 9:38horizontal directions to find out the
  255. 9:39total number of pixels well there we go
  256. 9:41we've got
  257. 9:43494
  258. 9:45304 pixels
  259. 9:49now multiply
  260. 9:51the number of pixels by the color depth
  261. 9:53so we times that by 16.
  262. 9:55so
  263. 9:5667 million
  264. 9:58just over
  265. 10:00now we divide the number of bits
  266. 10:03six seven million bits we divide that by
  267. 10:06um by eight to get the number of bytes
  268. 10:08so there we go we've got eight uh
  269. 10:10million three hundred and eighty eight
  270. 10:12thousand six hundred and eight bytes
  271. 10:15and then
  272. 10:17and then finally we need to convert the
  273. 10:18number of bytes we have the 83.8 million
  274. 10:22and we need to convert those bytes into
  275. 10:25um maybe bytes
  276. 10:28so if you remember from last time we're
  277. 10:30moving up in thousands
  278. 10:32so
  279. 10:34we go from bytes to kilobytes to
  280. 10:37megabytes
  281. 10:38so to do this we need to multiply 1024
  282. 10:42by 1024
  283. 10:44to give us a total of
  284. 10:46one
  285. 10:48um just over one million one million
  286. 10:50forty eight thousand five hundred and
  287. 10:52seventy eight
  288. 10:53and we're going to divide our original
  289. 10:55total our number of bytes
  290. 10:57by that figure
  291. 10:59so 83.8
  292. 11:01million divided by just over a million
  293. 11:03and we will end up with a final total of
  294. 11:06eight
  295. 11:07maybe buys
  296. 11:11now for the final one final question i'm
  297. 11:13going to move on to sound
  298. 11:16so
  299. 11:17we've got an audio cd
  300. 11:19um
  301. 11:20again these don't really exist anymore
  302. 11:22but it's how we used to store and how we
  303. 11:24used to buy um buy songs buy music back
  304. 11:27in the day
  305. 11:28so we have an audio cd
  306. 11:30and it has a sample rate of 44 100
  307. 11:34and a sample resolution
  308. 11:36of 16 bits
  309. 11:38let's wait for the ambulance to go past
  310. 11:40the music being sampled uses two
  311. 11:41channels stereo to allow for stereo
  312. 11:44recording calculate the file size for a
  313. 11:4760 minute recording
  314. 11:49okay so 60 minutes of music going onto
  315. 11:52that cd
  316. 11:54so
  317. 11:55the size of the file remember the
  318. 11:57calculation from before the sample rate
  319. 11:59in hertz times the sample resolution in
  320. 12:01bits times the length of the sample in
  321. 12:03seconds so we've got the value in hertz
  322. 12:0644 100 we've got 16 bits for the sample
  323. 12:09resolution
  324. 12:10and we've got 60 minutes of sampled
  325. 12:13recording
  326. 12:14so let's have a look at this
  327. 12:17the size of the sample would be 44 100
  328. 12:20times 16
  329. 12:21times 60
  330. 12:23times 60 again because remember we're
  331. 12:25working in
  332. 12:26um
  333. 12:27this it says
  334. 12:2860
  335. 12:29minutes but we need to get into 60
  336. 12:31seconds
  337. 12:32so we've got a total value there in bits
  338. 12:35um
  339. 12:36a giant number
  340. 12:39multiply that again by two
  341. 12:41to get an even bigger number um in terms
  342. 12:44of number of bits for a stereo recording
  343. 12:48and then divide by eight
  344. 12:50to get the number of bytes
  345. 12:54and then divide by 1024 by 1024 to
  346. 12:57convert that
  347. 12:59into megabit mega uh midi bits
  348. 13:02so we end up with um 60 minutes of
  349. 13:04recorded sound at that sample rate using
  350. 13:07that simple resolution would give us a
  351. 13:10total
  352. 13:11um
  353. 13:13file size total sound size of 605
  354. 13:17maybe bytes
  355. 13:21and that is it that's the end of this
  356. 13:22video um i did say at the beginning it
  357. 13:25is
  358. 13:26part one of um of two parts to sort of
  359. 13:29end the um data representation series so
  360. 13:32in the next video we're going to move on
  361. 13:34to understand the purpose and need for
  362. 13:36data compression and then we're going to
  363. 13:38be looking at lossy and loss and
  364. 13:40lossless compression techniques so
  365. 13:43thank you very much for watching please
  366. 13:45if you haven't already please subscribe
  367. 13:47so i can continue making these videos i
  368. 13:50hope you've enjoyed it hope you've
  369. 13:51learned something from it and i will see
  370. 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.