aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohit Agarwal <mohit.agarwal@sky.com>2021-10-10 15:12:23 +0100
committerMohit Agarwal <mohit.agarwal@sky.com>2021-10-10 15:12:23 +0100
commitcba64fd45faf3f8d7981a8e28b0f21881d0f7eb5 (patch)
tree7c035405b162a9bb46d2c5ffe2cc055664cc4a57
parent4d32410ba6d2bdf9b994bd889f698ba6b090c91d (diff)
Writing notes and questions.
-rwxr-xr-xnotes/Makefile1
-rw-r--r--notes/hardware.tex6
-rw-r--r--notes/images/by-sa.pngbin0 -> 17594 bytes
-rw-r--r--notes/networks.tex105
-rw-r--r--notes/paper.tex33
-rw-r--r--tests/1-data-rep/paper.tex8
-rw-r--r--tests/1-data-rep/questions.tex15
7 files changed, 145 insertions, 23 deletions
diff --git a/notes/Makefile b/notes/Makefile
index 4f8bc00..8f18257 100755
--- a/notes/Makefile
+++ b/notes/Makefile
@@ -5,6 +5,7 @@ build:
cp *tex target
cp -r images target
cd target && xelatex paper.tex
+
clean:
rm -rf target
read:
diff --git a/notes/hardware.tex b/notes/hardware.tex
index d9cebed..0141944 100644
--- a/notes/hardware.tex
+++ b/notes/hardware.tex
@@ -29,9 +29,9 @@ cycle. It is very successful due to its need for only one memory unit
and the ability to have general purpose rather than specific purpose
hardware, which early computers were and had to be rewired to change.
-The design however does lead to the \textbf{`von Neumann bottleneck'} as data
-and instructions must be fetched from the same memory unit over the
-same bus.
+The design however does lead to the \textbf{`von Neumann bottleneck'}
+as data and instructions must be fetched from the same memory unit
+over the same bus.
\section{Boolean logic}
diff --git a/notes/images/by-sa.png b/notes/images/by-sa.png
new file mode 100644
index 0000000..8770732
--- /dev/null
+++ b/notes/images/by-sa.png
Binary files differ
diff --git a/notes/networks.tex b/notes/networks.tex
index a41c844..e01c094 100644
--- a/notes/networks.tex
+++ b/notes/networks.tex
@@ -92,3 +92,108 @@ point of failure and can be eavesdropped on, leading to the compromise
of all data. Data sent by one device is received by all other devices
thus compromising privacy and only one device can send data on the
backbone at a time, thus slowing the network.
+
+\subsection{Star topology}
+
+
+\begin{center}
+\begin{tikzpicture}
+ \filldraw (0,0) circle (3pt);
+ \draw [-o] (0,0) -- (7,0);
+ \draw [-o] (0,0) -- (5,3);
+ \draw [-o] (0,0) -- (-4,2);
+ \draw [-o] (0,0) -- (-3,-1);
+ \draw [-o] (0,0) -- (2,-2);
+ \draw [-o] (0,0) -- (0,2.5);
+\end{tikzpicture}
+\end{center}
+
+The star topology is designed with a central device; either a
+\textbf{hub} or a \textbf{switch}. All devices are connected to this
+central device. Naturally, this uses far more cable than the bus
+topology. A hub will take data and send it to all other nodes in the
+network, which creates excess traffic, lends itself to eavesdropping,
+and is quite slow. However, hubs are generally outdated and switches
+are used. A switch will only route data to the correct segment.
+Switches are high performance, secure, scalable, and reliable,
+however, they and the cost of cable in the star topology can be quite
+expensive. Furthermore, although the backbone of the bus is no longer
+a single point of failure, the hub or switch can be.
+
+Modern networks are generally modified versions of the star topology
+with a switch in the centre.
+
+\section{The TCP/IP stack and protocols}
+
+A protocol is an agreed method of communication for sharing data.
+The \textit{TCP/IP network stack} is perhaps the most popular and
+commonly used network protocol stack. Therefore, we consider the stack
+and a simplified model of how data is transferred. These are the
+\textit{layers} of the stack in order:
+
+\subsection{Application layer}
+
+The application layer is where the user interacts. Because of this the
+most commonly known protocols exist on this layer. \textit{Hypertext
+Transfer Protocol} (HTTP) is perhaps the most well known protocol. It
+is used to describe web pages in a way that is understandable by
+humans. Many websites today use HTTPS, the secure version of HTTP
+which includes encryption so that a communication that is eavesdropped
+on cannot be understood. Other protocols in this layer include the
+\textit{File Transfer Protocol} (FTP), and the protcolos used for
+email: the \textit{Internet Message Access Protocol} (IMAP) which
+receives mail, the \textit{Simple Mail Transfer Protocol} (SMTP) which
+sends mail, and the older \textit{Post Office Protocol 3} which also
+receives mail.
+
+\subsection{Transport later}
+
+The transport layer establishes basic communications channels,
+might ensure that data arrives in the correct order by numbering data,
+and potentially ensuring reliability through error checking
+information.
+
+The \textit{Transmission Control Protocol} (TCP) is at this layer and
+sends data with error checking and ordering information. Data is
+ordered at the receiving end and if it is found incorrect by error
+checking, then it requested by again. The TCP specifies a
+\textit{handshake} procedure that the process must begin with in order
+to establish the communication properly. This is therefore a very
+reliable protocol, making it useful for message based communications
+or transfer of data where there should not be mistakes.
+
+The \textit{User Datagram Protocol} (UDP) is another protocol at this
+layer. There is no handshake process, and data is simply sent as a
+continuous \textit{bite stream}. If the data received contains errors
+or is missing there is no process to repair this. The protocol is
+therefore very fast but not as reliable as TCP. Therefore, it is used
+in cases such as video streaming, where small errors or some missing
+data is acceptable.
+
+\subsection{Network layer}
+
+The network layer is responsible for addressing and routing packets of
+data. Each packet contains a source, destination, a small amount of
+data, and error checking information. The \textit{Internet Protocol}
+(IP) is the standard protocol at this layer, and specifies addresses
+with the IPv4 standard, which uses a 32 bit address giving around 4.3
+billion unique addresses. This is being replaced by IPv6 which uses
+128 bit addresses to yield around $3.4 \times 10^{38}$ unique
+addresses
+\footnote{\url{https://en.wikipedia.org/wiki/Internet_Protocol}}.
+
+\subsection{Data link layer}
+
+The data link layer converts the data produced by the above layers
+into signals that will be sent over the network. This consists of the
+network hardware. In particular, networked computers have a
+\textit{Network Interface Card}, which turns the data into electrical
+signals. Consumer systems today typically contain a \textit{Wireless
+Network Interface Card} which allows communications through Wi-Fi and
+Bluetooth.
+
+\subsection{Physical layer}
+
+The physical layer is the communication media and method by which
+data is transferred, such as the Ethernet standard over twisted pair
+or Wi-Fi by the use of radio waves.
diff --git a/notes/paper.tex b/notes/paper.tex
index 4a1dbaf..48dce83 100644
--- a/notes/paper.tex
+++ b/notes/paper.tex
@@ -16,8 +16,9 @@ top=0.5in, bottom=0.8in ]{geometry}
\usepackage{lipsum}
\usepackage{fix-cm}
\usepackage{amsmath}
+\usepackage{multicol}
-\usepackage[scale=0.85]{plex-mono}
+\usepackage[scale=0.90]{plex-mono}
\usepackage{plex-sans}
\usepackage{fontspec}
@@ -28,9 +29,8 @@ top=0.5in, bottom=0.8in ]{geometry}
\usetikzlibrary{calc,shapes.geometric,shapes.gates.logic.US,arrows}
-
\setlength{\parskip}{0.5em}
-
+\linespread{1.1}
\PassOptionsToPackage{hyphens}{url}
\usepackage{hyperref}
@@ -46,15 +46,13 @@ top=0.5in, bottom=0.8in ]{geometry}
\list{}{\leftmargin=1in\rightmargin=0.6in}\item[]}%
{\endlist}
-
-
-\title{Physics}
+\title{Computer Science}
\author{Mohit Agarwal}
\date{2021}
\titleformat{\section}{\large}{}{0em}{}
\titleformat{\subsection}{\bfseries}{}{0em}{}
-\titleformat{\chapter}{\tt\huge\itshape}{}{0em}{}
+\titleformat{\chapter}{\vspace{-2cm}\tt\huge\itshape}{}{0em}{}
\begin{document}
\begin{titlepage}
@@ -70,9 +68,9 @@ top=0.5in, bottom=0.8in ]{geometry}
\noindent \normalsize by Mohit Agarwal
\end{titlepage}
-
\tableofcontents
+
\input{algorithms.tex}
\input{hardware.tex}
\input{software.tex}
@@ -80,12 +78,13 @@ top=0.5in, bottom=0.8in ]{geometry}
\chapter{Acknowledgements, about, and license}
Notes for AQA GCSE Computer Science.\\
-\\by Mohit Agarwal <\url{https://mohit.uk}>, in October 2021
+\\by Mohit Agarwal (\url{https://mohit.uk}), in October 2021
\vspace{2cm}
\noindent This work was made possible by:\\
\begin{myquote}
- \large Ms N. Clarke
+ %\large Ms N. Clarke
+ Ms N. Clarke
\end{myquote}
\vspace{2cm}
@@ -97,16 +96,16 @@ the topics covered in lessons, allowing for a greater emphasis of your
time on trying to answer questions and play with the ideas discussed.
\vspace{2cm}
-\noindent\includegraphics{images/by.png}
\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}
+ This work is licensed under the Creative Commons
+ Attribution-ShareAlike 4.0 International License. To view a copy
+ of this license, visit
+ \url{http://creativecommons.org/licenses/by-sa/4.0/} or send a
+ letter to Creative Commons, PO Box 1866, Mountain View, CA 94042,
+ USA.
+\end{myquote}
\end{document}
-
diff --git a/tests/1-data-rep/paper.tex b/tests/1-data-rep/paper.tex
index 02bf96d..a2875b4 100644
--- a/tests/1-data-rep/paper.tex
+++ b/tests/1-data-rep/paper.tex
@@ -16,6 +16,7 @@ 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}
@@ -66,10 +67,10 @@ top=0.5in, bottom=0.8in ]{geometry}
Computer Science Test: Data representation
\vspace{5mm}
-\makebox[0.75\textwidth]{Name:\enspace\hrulefill}
+\makebox[\textwidth]{Name:\enspace\hrulefill}
\vspace{5mm}
-\makebox[0.75\textwidth]{Instructor’s name:\enspace\hrulefill}
+\makebox[\textwidth]{Teacher’s name:\enspace\hrulefill}
\vspace{2cm}
@@ -80,7 +81,8 @@ Computer Science Test: Data representation
\vspace{2cm}
\noindent Written by Mohit Agarwal (\url{https://mohit.uk}) for the
-Computing Department at William Perkin Church of England High School
+Computer Science Department at William Perkin Church of England High
+School
\begin{myquote}
This work is licensed under the Creative Commons Attribution 4.0
diff --git a/tests/1-data-rep/questions.tex b/tests/1-data-rep/questions.tex
index 62e1106..489ae8a 100644
--- a/tests/1-data-rep/questions.tex
+++ b/tests/1-data-rep/questions.tex
@@ -41,6 +41,21 @@
\end{parts}
\droptotalpoints
+ \pagebreak
+
+ \question Let us say there is a string:
+
+ \verb|Hi|
+
+ \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?
+
+ \end{parts}
+
\end{questions}