\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{{[}deleted{]}} \pdfinfo{ /Title (computer-systems-aqa-computer-science.pdf) /Creator (Cheatography) /Author ({[}deleted{]}) /Subject (Computer Systems - AQA Computer Science Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{00D5FF} \definecolor{LightBackground}{HTML}{EFFCFF} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Computer Systems - AQA Computer Science Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{{[}deleted{]}} via \textcolor{DarkBackground}{\uline{cheatography.com/56036/cs/15728/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}{[}deleted{]} \\ \uline{cheatography.com/deleted-56036} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 13th May, 2018.\\ Updated 13th May, 2018.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Hardware and Software}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{Hardware}} is the physical components of a computer system, whereas {\bf{software}} is the programs that are run {\emph{using}} the hardware. Generally, one is useless without the other.% Row Count 4 (+ 4) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.9 cm} x{3.116 cm} x{2.584 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Software Classification}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Keyword}} & {\bf{Definition}} & {\bf{Example(s)}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{Operating Systems}} & Software loaded by the computer following the initial boot-up which controls both the hardware and software, incuding the processor, memory, I/O devices, and security. & Windows 10, macOS \tn % Row Count 13 (+ 11) % Row 2 \SetRowColor{LightBackground} {\bf{Systems software}} & Software that controls the operation of hardware in a computer. & \tn % Row Count 17 (+ 4) % Row 3 \SetRowColor{white} {\bf{Application software}} & Programs designed for the user to use to perform a specific task(s). & Internet Explorer, Microsoft Word \tn % Row Count 22 (+ 5) % Row 4 \SetRowColor{LightBackground} {\bf{Utility Programs}} & A type of {\bf{systems software}} that manages the computer's resources & \seqsplit{Defragmentation}, file encryption \tn % Row Count 27 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.08 cm} x{5.92 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Truth Tables for Logic Gates}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Logic Gate}} & {\bf{Truth Table}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} AND & {\bf{x}}~~~{\bf{y}}~~~{\bf{z}}\{\{nl\}\}0~~~0~~~0\{\{nl\}\}1~~~0~~~0\{\{nl\}\}0~~~1~~~0\{\{nl\}\}1~~~1~~~1 \tn % Row Count 10 (+ 8) % Row 2 \SetRowColor{LightBackground} OR & {\bf{x}}~~~{\bf{y}}~~~{\bf{z}}\{\{nl\}\}0~~~0~~~0\{\{nl\}\}1~~~0~~~1\{\{nl\}\}0~~~1~~~1\{\{nl\}\}1~~~1~~~1 \tn % Row Count 18 (+ 8) % Row 3 \SetRowColor{white} NOT & {\bf{x}}~~~{\bf{z}}\{\{nl\}\}1~~~0\{\{nl\}\}0~~~1 \tn % Row Count 21 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Here, 'x' and 'y' are the inputs, while 'z' is the output.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Logic Circuits}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{8.4cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/danielles_1526110777_logic-circuit.png}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{\seqsplit{https://www.bbc.com/education/guides/zc4bb9q/revision/3}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Truth Tables for Logic Circuits}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{A~~~B~~~C~~~D~~~E~~~Z}} \newline % Row Count 3 (+ 3) 0~~~0~~~0~~~1~~~0~~~1 \newline % Row Count 5 (+ 2) 0~~~0~~~1~~~1~~~0~~~1 \newline % Row Count 7 (+ 2) 0~~~1~~~0~~~1~~~0~~~1 \newline % Row Count 9 (+ 2) 0~~~1~~~1~~~1~~~1~~~1 \newline % Row Count 11 (+ 2) 1~~~0~~~0~~~0~~~0~~~0 \newline % Row Count 13 (+ 2) 1~~~0~~~1~~~0~~~0~~~0 \newline % Row Count 15 (+ 2) 1~~~1~~~0~~~0~~~0~~~0 \newline % Row Count 17 (+ 2) 1~~~1~~~1~~~0~~~1~~~1% Row Count 19 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{This is an example of a truth table for the logic circuit above.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Embedded Systems}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{An {\bf{embedded system}} is normally built into a larger device. It has a small number of specific functions. An example could be a satnav in a car. {\bf{Non-embedded systems}}, on the other hand, carry out multiple functions and are not built into anything else% Row Count 6 (+ 6) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Systems Architecture}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Component}} & {\bf{Purpose}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Central Processing Unit}} (or {\bf{CPU}}) & Processes data and instructions and make decisions. It is composed of many components (e.g. the CU, the ALU). \tn % Row Count 7 (+ 6) % Row 2 \SetRowColor{LightBackground} {\bf{Control Unit}} (or {\bf{CU}}) & Controls the operation of the ALU, memory and I/O devices; tells them how to respond to instructions it has fetched and decoded. \tn % Row Count 14 (+ 7) % Row 3 \SetRowColor{white} {\bf{Arithmetic Logic Unit}} (or {\bf{ALU}}) & Carries out arithmetic and logical operations. Results are stored in a {\bf{register}}. \tn % Row Count 19 (+ 5) % Row 4 \SetRowColor{LightBackground} {\bf{Clock}} & A crystal that vibrates at high speeds, dictating how many times a second the \seqsplit{fetch-decode-execute} cycle can be carried out. \tn % Row Count 26 (+ 7) % Row 5 \SetRowColor{white} {\bf{Bus}} & Transports data and instructions around the CPU. \tn % Row Count 29 (+ 3) % Row 6 \SetRowColor{LightBackground} {\bf{Register}} & Storage areas in the CPU. \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Systems Architecture (cont)}} \tn % Row 7 \SetRowColor{LightBackground} {\bf{Main Memory}} & Any form of memory directly accessible by the CPU (excl. cache, registers). \tn % Row Count 4 (+ 4) % Row 8 \SetRowColor{white} {\bf{Cache}} & Small, fast memory that is close to the CPU. Stores data that is used frequently. \tn % Row Count 9 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{The AQA specification is only interested in the {\bf{Von Neumann Architecture}}, which is also called the {\bf{Princeton Architecture}}. Unlike in {\bf{Harvard architecture}}, Von Neumann stores data and instructions together.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Von Neumann Architecture}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{8.4cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/danielles_1526111782_1200px-Von_Neumann_Architecture.svg.png}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{\seqsplit{https://en.wikipedia.org/wiki/Von\_Neumann\_architecture}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Fetch-Decode-Execute Cycle}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{8.4cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/danielles_1526112398_f-d-e.png}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{The fetch-decode-execute cycle is a process carried out by the CPU to process an instruction. In the 'fetch' stage, the instruction is loaded into the main memory. The computer then decodes and 'understands' the instruction and executes the instruction. This final stage may include calculation being carries out by the ALU.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Secondary Storage}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{What is {\bf{secondary storage}}?} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Any storage that isn't under the direct control of the CPU. It stores data and information when the computer is off.} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{What is {\bf{RAM}}?} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}{\bf{R}}andom {\bf{a}}cess {\bf{m}}emory. Is volatile, so all data is lost once the power supply is switched off. Stores programs and data currently in use. Can be written to and read from.} \tn % Row Count 9 (+ 5) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{What is {\bf{ROM}}?} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}{\bf{R}}ead {\bf{o}}nly {\bf{m}}emory. Stores programs needed to boot up the computer. Can only be read from. Non-volatile. Generally smaller in memory capacity.} \tn % Row Count 14 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Types of Storage}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Magnetic} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Magnetic storage uses magnets to record data on rotating metal plates. The most common example is a hard drive. \{\{nl\}\} Advantages: \{\{nl\}\} 1. Large storage capacity \{\{nl\}\} 2. Decent read/write access \{\{nl\}\} 3. Cheap \{\{nl\}\} Disadvantages: \{\{nl\}\} 1. Moving parts result in wear and tear \{\{nl\}\} 2. Data can be lost/altered by magnets} \tn % Row Count 8 (+ 8) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Optical} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Optical storage uses a lens and a light beam to read and write data onto a disk (e.g. CD, DVD). \{\{nl\}\} Advantages: \{\{nl\}\} 1. Light and portable \{\{nl\}\} 2. Cheap \{\{nl\}\} 3. Durable \{\{nl\}\} 4. Some formats (e.g. CD-R) mean that data cannot be overwritten \{\{nl\}\} Disadvantages: \{\{nl\}\} 1. Small storage capacity \{\{nl\}\} 2. Specific drive needed to read/write data to/from the disk} \tn % Row Count 17 (+ 9) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Solid State} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Solid-state uses flash memories/electrical circuits to store data. It is commonly used in USBs and SD cards. \{\{nl\}\} Advantages: \{\{nl\}\} 1. Very quick read/write speed \{\{nl\}\} 2. Compact \{\{nl\}\} 3. No moving parts\{\{nl\}\} 3. Robust \{\{nl\}\} Disadvantages: \{\{nl\}\} 1. Expensive \{\{nl\}\} 2. Limited number of times that data can be written to} \tn % Row Count 25 (+ 8) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Cloud} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}Data is stored (using normal magnetic/solid state storage) at a remote location and is accessed via the Internet. Popular examples are Google Drive and Dropbox. \{\{nl\}\} Advantages: 1. Can be accessed from anywhere in the world, granting increased flexibility \{\{nl\}\} 2. Can be accessed by multiple users at once \{\{nl\}\} 3. Users don't need to buy additional hardware \{\{nl\}\} Disadvantages: \{\{nl\}\} 1. Requires an Internet connection \{\{nl\}\} 2. No control over the data in terms of security} \tn % Row Count 37 (+ 12) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.36 cm} x{4.64 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Factors Affecting CPU Performance}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Clock Speed}} (Hz) & Dictates the number of fetch-decode-execute cycles run per second. \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{Number of Processor Cores}} & Having multiple cores allows a CPU to process multiple instructions simultaneously. \tn % Row Count 7 (+ 4) % Row 2 \SetRowColor{LightBackground} {\bf{Cache Size}} & Allows the CPU to store more instructions/data that are regularly used, reducing the time taken to process an instruction. \tn % Row Count 13 (+ 6) % Row 3 \SetRowColor{white} {\bf{Cache Type}} & L1 cache is faster than L2 and L3 cache. \tn % Row Count 15 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}