Please enable JavaScript.
Coggle requires JavaScript to display documents.
Computer Science revision - Coggle Diagram
Computer Science revision
Binary
Bit = binary digit. Either 1 or 0 means transistor is open or closed in cpu. Like an on off switch 1 = open 0 = closed
Nibble= 4 bits e.g, 0010, 0110 or 1001
Byte= 8 bits e.g 0010 0110 or 1110 0101
KB = kilobyte MB = megabyte GB = gigabyte lower case mb = megabit kb = kilobit gb = gigabyte bit is 8x smaller than byte
Binary Place values 256,128,64,32,16,8,4,2,1 etc over 000000000
Binary to denary
Binary to denary add up place values e.g, 0001 = 1 0010 = 2 0110 = 6 01111111 =128
Denary to binary
Denary to binary continuously divide by 2 and watch remainders e.g 65 65/2 = 32 r 1 32/2 = 16 r 0 16/2 = 8 r 0 8/2 = 4 r 0 2/ 2 = 1 r 0 1/2 = 0 r 1 add up 0s and 1s to get 100001
Characters
Character representation, stored in binary each character has a matching byte or bit which is different depending on the character set.
ASCII uses 7 bit character set Good enough for enough for English language and European languages without accents. Limited punctuation.128 combos stores 128 characters
Extended ascii uses 8 bits now allows for accents still not enough for mandarin or other languages that don't use European letters. Much wider punctuation.256 combos for 256 characters
Unicode (UTF) is either represented in 8bit,16bit or 32 bit UTF-8, UTF-16, UTF-32 Most common character set can fit every languages needed letters and also can use emojis Can store 256, 65,536 or 4294967296 combos depending on amount of bits.
Tradeoff
More memory is used the bigger the character set
Sound
Needs ADC analogue to digital converter to record sound Must also be converted to binary so it can be stored. Needs DAC to play sounds, computer must convert binary sound file into analogue for speaker to understand
Speakers play sound in response to a digital signal. Sound card converts into analogue signals for speaker to understand and then play sound.
Mic records analogue waves. It then sends it to a sound card which will save it as binary
Sampling rate computer cannot listen continuously so it listens on and off style so man times a second. this is the sampling rate measured in hertz e.g, 44.1khz or 192khz
Bit rate = data per sample. How of much of each analogue signal sampled is recognised and stored by the computer
Pictures
Pixel = picture element. Stored as binary. Each pixel is a part of a much larger image. Number of pixels equals resolution and colour depth of each pixel determines how deep the colours are for an image. This is for bitmap images
Vector images. Instructions stored as binary give vectors as instructions for computer to redraw image each time image is opened
Picture size = width x height (pixels) x colour depth
Hexadecimal
16 base counting system 1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
read as 2 digits side by side eg 1F or A4
hex to binary
split into 2 nibbles eg 1A = 0001 01010
hex to denary
split into to two denary digits and convert letters to denary then multiply first hex by 16 eg 4F = 4x16 + 1x15 = 64 + 15 = 79
binary to hex split into nibbles, convert into denary then translate denary digits into hex
denary to hex
divide denary number by 16 then ignore any decimal points and convert the quotient to hex eg 177/16 = 11.0625 11- B This is first hex digit. Then multiply quotient by 16 so 11 x 16 = 176 and minus it off orignal number 177-176 = 1 Hex number is B1
Logic gates
Logic gates are physical switches in the CPU that perform basic logical functions based on binary input. For example a NOT gate will output the opposite to what it receives and an AND gate will only output one if all criteria are fulfilled. OR gates will output one if at least one of the criteria are fulfilled
The results of gates are represented in Truth tables, a grid with columns for each input and one column for the one output based on the logic gate logic.
Logic circuits
Two gates joined together in order to perform more complex decisions.
CPU (The Central Processing Unit)
Registers: Super fast memory, closer to cores than cache and faster. For storing a few instructions needed very fast.
Program counter: stores location of next instruction to be executed
Memory Address Register: stores address of current memory address for data/instruction to be sent to or fetched from
Memory data register: stores data/instruction fetched from or waiting to be sent to memory
Instruction register: stores instruction ready to be executed
Accumulator: stores the result of any arithmetic or logical operations preformed by the ALU (arithmetic logic unit)