aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--readme29
-rwxr-xr-xtests/1-data-rep/Makefile2
-rw-r--r--tests/1-data-rep/answers.tex91
-rw-r--r--tests/1-data-rep/paper.tex5
-rw-r--r--tests/1-data-rep/questions.tex139
6 files changed, 252 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 704d592..bc00c64 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
install:
cd notes && make && make && make
- cd notes && cp target/paper.pdf /var/www/git/gcse/computer-science-aqa/notes.pdf
+ cd notes && cp target/paper.pdf /var/www/git-bin/gcse/computer-science-aqa/notes.pdf
#cd tests/1-data-rep && make && make && make
#cd tests/1-data-rep && cp target/paper.pdf /var/www/git/gcse/computer-science-aqa/1-data-rep-test.pdf
diff --git a/readme b/readme
new file mode 100644
index 0000000..c4552b1
--- /dev/null
+++ b/readme
@@ -0,0 +1,29 @@
+GCSE AQA Computer Science Resources
+
+For compiled versions of the files (pdf): visit
+https://mohit.uk/git/gcse/computer-science-aqa/
+
+To clone this repository run
+
+ git clone https://mohit.uk/gitserver/gcse/computer-science-aqa.git/
+
+The main directory is notes, which consists of (relatively) concise
+notes for the AQA specification.
+
+For any thoughts, suggestions, or comments, contact me at:
+mohit.agarwal@sky.com.
+
+Licence
+
+[Creative Commons License]
+This work is licensed under a Creative Commons Attribution-ShareAlike
+4.0 International License.
+
+Dependencies
+
+In order to build the LaTeX, I use makefiles and XeLaTeX:
+
+- Make
+- Linux/Unix coreutils (mostly cd)
+- XeLaTex (TeXLive-full)
+- The font used is called Sabon, which you can find online or change
diff --git a/tests/1-data-rep/Makefile b/tests/1-data-rep/Makefile
index 024703d..0c0f400 100755
--- a/tests/1-data-rep/Makefile
+++ b/tests/1-data-rep/Makefile
@@ -3,8 +3,8 @@ default: build
build:
ls target || mkdir target
cp *tex target
- #cp -r images target
cd target && xelatex paper.tex
+ cd target && xelatex answers.tex
clean:
rm -rf target
read:
diff --git a/tests/1-data-rep/answers.tex b/tests/1-data-rep/answers.tex
new file mode 100644
index 0000000..f1f09a7
--- /dev/null
+++ b/tests/1-data-rep/answers.tex
@@ -0,0 +1,91 @@
+\documentclass[12pt, answers]{exam}
+
+\hyphenpenalty=10000
+\hbadness=10000
+\widowpenalty=10000
+\clubpenalty=10000
+\sloppy
+
+\pagestyle{plain}
+\usepackage{titlesec}
+\usepackage{circuitikz}
+\usepackage{graphicx}
+\usepackage{svg}
+\usepackage[a4paper, right=1.5in, left=1.5in,
+top=0.5in, bottom=0.8in ]{geometry}
+\usepackage{lipsum}
+\usepackage{fix-cm}
+\usepackage{amsmath}
+\usepackage{verbatim}
+
+\usepackage[scale=0.85]{plex-mono}
+\usepackage{plex-sans}
+
+\usepackage{fontspec}
+\defaultfontfeatures{LetterSpace=1.05}
+\setmainfont{Sabon}
+
+\ctikzset{resistor = european}
+
+\usetikzlibrary{calc,shapes.geometric,shapes.gates.logic.US,arrows}
+
+
+\setlength{\parskip}{0.5em}
+
+
+\PassOptionsToPackage{hyphens}{url}
+\usepackage{hyperref}
+\hypersetup{
+ colorlinks,
+ citecolor=black,
+ filecolor=black,
+ linkcolor=black,
+ urlcolor=black
+}
+
+\usepackage{titling}
+\newenvironment{myquote}{
+\list{}{\leftmargin=1in\rightmargin=0.6in}\item[]}%
+{\endlist}
+
+
+\setlength{\droptitle}{-3cm}
+
+\pretitle{\vspace{0.3in}\begin{flushleft}\Large\bfseries}
+\posttitle{\par\end{flushleft}}
+\preauthor{\vspace{0.1in}\begin{flushleft}}
+\postauthor{\end{flushleft}}
+\predate{\begin{flushleft}}
+\postdate{\par\end{flushleft}}
+
+\title{Computer Science Paper 1}
+\author{Mohit Agarwal}
+\date{2021}
+
+\begin{document}
+
+Computer Science Test: Data representation
+
+
+\vspace{2cm}
+
+Answers
+
+\vspace{2cm}
+
+\noindent Written by Mohit Agarwal (\url{https://mohit.uk}) for the
+Computer Science Department at William Perkin Church of England High
+School
+
+\begin{myquote}
+This work is licensed under the Creative Commons Attribution 4.0
+International License. To view a copy of this license, visit\\
+\url{http://creativecommons.org/licenses/by/4.0/} or send a letter to
+Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
+\end{myquote}
+
+
+\include{questions.tex}
+
+\end{document}
+
diff --git a/tests/1-data-rep/paper.tex b/tests/1-data-rep/paper.tex
index a2875b4..7ef7663 100644
--- a/tests/1-data-rep/paper.tex
+++ b/tests/1-data-rep/paper.tex
@@ -74,6 +74,11 @@ Computer Science Test: Data representation
\vspace{2cm}
+\centering
+\fbox{Use of a calculator is permitted}
+
+\vspace{2cm}
+
\begin{center}
\gradetable[h][questions]
\end{center}
diff --git a/tests/1-data-rep/questions.tex b/tests/1-data-rep/questions.tex
index 489ae8a..bc32ed8 100644
--- a/tests/1-data-rep/questions.tex
+++ b/tests/1-data-rep/questions.tex
@@ -2,16 +2,29 @@
\question Lucy records using her camera. The camera saves the
audio and video parts of the recording seperately. Lucy transfers
- recording to her computer. The audio file has a size of 12.8 kB.
- Audio is recorded at a sample rate of 320 kB per second. The audio
+ recording to her computer. The audio file has a size of 19 MB.
+ Audio is recorded at a sample rate of 45 kHz. The audio
resolution is 32 bits.
\begin{parts}
- \part[5] In minutes, how many seconds was the recording.
+ \part[5] In minutes and seconds, how long was the recording.
+
+ \begin{solution}
+ \begin{align*}
+ size &= sample\ rate\times sample\ resolution\times length\\
+ 18000000 \times 8 &= 45000\times32\times length\\
+ 18000000 &= 45000\times4\times length\\
+ 18000 &= 45\times4\times length\\
+ 18000 &= 180\times length\\
+ length &= 100\ seconds\\
+ &= 1\ minute\ 40\ seconds\\
+ \end{align*}
+ \end{solution}
+
\vspace{\stretch{1}}
- \part[5] A video file consists of many still frames. Each
+ \part[4] A video file consists of many still frames. Each
frame is a normal image. The size of a video file can
therefore be expressed as:
@@ -21,40 +34,138 @@
\end{align*}
If each frame is 1920 pixels wide and 1080 pixels high in
- resolution, and the bit depth of 24 bits, what is the file
- size of the video file.
+ resolution, the bit depth of 24 bits, and her camera records
+ 30 frames each second. What is the file size of the video
+ file, rounded to 3 significant figures, in bytes, with some
+ sensible unit prefix?
+
+ \begin{solution}
+
+ Allow error carried forward for time
+ \begin{align*}
+ size &= length\times frames\ per\ second\times
+ resolution\times colour\ depth\\
+ &= 100\times 30 \times 1920\times1080\times24\\
+ &= 149299200000\ bits\\
+ &= 18662400000\ bytes\\
+ &\approx 18.7\ GB
+ \end{align*}
+ Three points for correct calculation. One point for
+ correct rounding and unit prefix. Accept other suitable
+ unit prefix.
+ \end{solution}
\vspace{\stretch{1}}
-
+
\pagebreak
\part[1] Lucy combines the audio and video to form a file. She
then runs a lossy compression algorithm on the resulting file.
What is lossy compression?
- \vspace{\stretch{1}}
- \part[3] The file size after compression is reduced by 20\%.
- What is the final file size?
+ \begin{solution}
+ Reducing the size of a file by removing data.
+ \end{solution}
\vspace{\stretch{1}}
+ \part[3] The file size after compression is reduced by 95\%.
+ What is the final file size? Use your rounded value for
+ video file size. Once more leave your answer rounded to 3
+ significant figures, in bytes, with a suitable unit prefix.
+
+ \begin{solution}
+
+ Allow error carried forward for size
+ \begin{align*}
+ Compressed\ Size &=
+ 18.7\times 10^9 + 19\times 10^6 * 0.05\\
+ &= 935950000\\
+ &= 0.93595\ GB\\
+ &\approx 0.936\ GB
+ \end{align*}
+ Two points for correct calculation. One point for
+ correct rounding and unit prefix. Accept other suitable
+ unit prefix.
+ \end{solution}
+ \vspace{\stretch{2}}
+
\part[1] State an assumption made for part (d).
+
+ \begin{solution}
+ There is no metadata or other factor that would influence
+ the file size.
+ \end{solution}
+ \vspace{\stretch{1}}
+
+ \pagebreak
+
+ \part[3] Using your rounded value for the total compressed
+ file size, and the length of recording, find a value for the
+ size of a compressed video with sound per second.
+
+ Leave your answer rounded to 3 significant figures, with a
+ suitable unit and prefix.
+
+ \begin{solution}
+
+ Allow error carried forward for size or time
+ \begin{align*}
+ Rate &= size \div time\\
+ &= 0.936\ GB \div 100\\
+ &= 9.36\ MB/s
+ \end{align*}
+ Two points for correct calculation. One point for correct
+ unit and unit prefix. Accept other suitable unit prefix.
+ \end{solution}
+
+ \vspace{\stretch{1}}
+
+ \part[3] Lucy wants to record 1 hour of video. Estimate how
+ much space this will take on her hard drive when the video and
+ audio are combined and compressed, using your answer to (f).
+
+ Leave your answer rounded to 3 significant figures, in bytes,
+ with a suitable unit prefix.
+ \begin{solution}
+
+ Allow error carried forward for size or time
+ \begin{align*}
+ Size &= rate \times time\\
+ &= 9.36 \times 60\times 60\\
+ &\approx 33.7\ GB
+ \end{align*}
+ Two points for correct calculation. One point for correct
+ unit and unit prefix. Accept other suitable unit prefix.
+ \end{solution}
+
\vspace{\stretch{1}}
\end{parts}
\droptotalpoints
\pagebreak
- \question Let us say there is a string:
+ \question Let us say there are some bits:
- \verb|Hi|
+ \centering
+ 000110111100000001111111001
\vspace{1cm}
\begin{parts}
- \part[2] If the string is encoded in 8 bit ascii, how much
- space does the string take in bytes to store?
+ \part[2] Using run length encoding represent these bits.
+ \vspace{\stretch{1}}
+
+ \part[2] Computers store information in binary. Let us say
+ that a run is represented by 5 bits: 4 bits for the length of
+ the run, and 1 bit for the bit in the run. For example 00000
+ which is 5 zeroes would be 10010, using the first to bits to
+ represent the 5 and the final bit to represent the 0.
+ Represent your encoding in this format.
+ \vspace{\stretch{1}}
\end{parts}
+ \droptotalpoints
+ \pagebreak
\end{questions}