click below
click below
Normal Size Small Size show me how
DAVJ277 1.2.4
J277 GCSE CS 1.2.4 Binary, hex, characters, sound and images
Question | Answer |
---|---|
Convert denary numbers 0 - 255 into 8 bit numbers Convert 8 bit numbers into 0 - 255 denary numbers | Use a number line 12864 32 16 8 4 2 1 0 0 1 1 0 1 1 0 = 54 1 0 0 0 1 1 1 0 = 142 1 1 1 1 1 1 1 1 = 255 |
Add two 8 bit numbers | Use a number line and show carry - left to right 0+0=0, 0+1=1, 1+1=0 carry 1, 1+1+1=1 carry 1 128 64 32 16 8 4 2 1 0 0 1 1 0 1 1 0 54 1 0 0 0 1 1 1 0 142 + 1 1 0 0 0 1 0 0 = 196 |
Overflow | When there are insufficient bits reserved to store the result of a calculation. Leads to inconsistent result. |
What is a Binary shift | 1 place Left shift multiplies by 2. 1 place Right shift divides by 2. |
What arithmetic operation is a 3 place left shift equivalent to? | Multiplying by 8 (1 place left shift multiplies by 2) (2 places left shift multiplies by 4) (3 places left shift multiplies by 8) 2 to the power of the number of places |
What would the binary and denary equivalent of a one place left shift on 00110011 be? | The binary would be 0110011 0 Denary is 64+32+4+2 = 102 |
What would the binary and denary equivalent of a two place right shift on 00110011 be? What do you notice about the result? | The binary would be 00001100 Denary is 8+4 = 12 Accuracy is lost as 2 bits have been lost |
Identify the least significant bit and the most significant bit: 10101101 | The most significant is the bit on the far left (in the largest place value). The least significant bit is the bit on the far right (in the smallest (unit) place value). |
Convert denary number 0 to 255 into hexadecimal—convert 165 to hexadecimal | Divide by 16 for 1st digit remainder is 2nd. First digit is the DIV, second is the MOD Eg. 165 as hex 165/16 = 10 remainder. 6 = A6 0-9, A=10, B=11, C=12, D=13, E=14, F=15 |
Convert 2 digit hexadecimal into denary—What is A5 in denary? | 2 digit hex number: 1st column = number of 16s 2nd column = number of Units EXAMPLE 1: A5 hexadecimal = (10 x 16) + (5 x 1) = 160 + 5 = 165 denary EXAMPLE 2: 15 hexadecimal = (1 x 16) + (5 x 1) = 16 + 5 = 21 denary |
Convert 2 digit hexadecimal into binary—what is A7 in binary? | convert each digit to 4 bit binary then put numbers together. A7 in binary A = 10 in denary = 1001 in 4 bit binary 7 = 0111 in 4 bit binary A7 = 10010111 |
Convert 8 bit binary to hexadecimal Eg. 10010001 | Split into 2 nibbles so 10010001 becomes 1001 0001 1001 = 9 0001 = 1 Answer in hex =91 |
Define a Character set | All the characters which are recognised/UNDERSTOOD/can be represented by the computer system. Includes upper and lower case, numbers and symbols on the keyboard. |
How does ASCII or Unicode represent text in a computer system | 1) Each character is given a unique numeric code including symbols, digits, upper and lower case 2) This code is then stored in binary 10101011 3) Each character takes 1 byte (ascii) or 2 bytes (Unicode) 4) Text is stored as a series of bytes (1 per character ascii) – (2 bytes per character Unicode) 5) Some codes are reserved for control characters (eg TAB, Carriage Return) 6) As ASCII has more bits per character more characters can be stored. All alphabets in the world. |
What is the relationship between the number of bits per character and the number of characters in a set (ASCII V UNICODE) | ASCII - 1 byte 01010101, Unicode 2 bytes 01010101 10101111 ASCII - smaller character set - 128/256 combinations - Unicode larger character set - 65,536 combinations ASCII - can represent UK alphabet, numbers, symbols and control characters UNICODE - Can represent foreign alphabets, thousands of symbols and EMOJIS |
How are bitmap pictures stored on a computer? | An image is made up of/consists of pixels A pixel can only be one colour at a time Each colour has a unique corresponding binary number Each pixel is given the unique binary number of its colour The more bits that are used to store each pixel, the more colours are potentially available. This is known as colour depth. |
What is metadata? | Data about data. Additional data stored with an image including information such as: Width and height of image in pixels Number of bits per pixel (colour depth). Colour palette. Without this the computer will not know how to display the image |
Resolution | Resolution is the concentration of pixels or the number of pixels. The higher the resolution the more pixels are required for the picture which will increase the size of the bitmap file. |
What is the effect of colour depth on the size of an image file | The greater the colour depth the greater the file size as each pixel will require more bits of storage. For an image of height and width 64 x 64 64x64 at 1 bit colour = 4096 bits 64x64 at 8 bit colour = 32,768 bits. |
What is colour depth? | The number of bits assigned to each pixel. More bits = more possible colours = larger file 1 bit = 2^1 = 2 colours 2 bits=2^2 = 4 colours 3 bits = 2^3 = 8 colours etc. |
How is sound sampled and stored in digital form | Measurements of amplitude (height of sound wave) taken at regular intervals and stored in binary. Each of these is known as a sample. Frequency of interval = sample rate. Bit depth = sample size |
Name and define some key sound terms | Sampling rate or sampling frequency - the number of samples per second Sample size (or bit depth) - the number of bits available for each sample Bit rate - the number of bits per second of audio = sampling frequency x sample size REMEMBER! A sample is a measurement of the height/amplitude of the analogue wave |
What is bit rate? | Bit rate is the number of bits per second of audio. Bit rate = Sample rate multiplied by bit depth. |
What is Bit depth? | The number of bits used to store each sample. The higher the number the better the quality. The higher the number the larger the file size. |
If a sound file is 10 seconds long. It has a bit depth of 8 and a sample rate of 1GHz (1,000,000,000) What is the size of the file? | Bit rate = Sample rate multiplied by bit depth. File size =Sample rate x bit depth x duration =1000,000,000 x 8 x 10 =80,000,000,000 |
How does sampling rate affect the size of the file? | A higher sampling rate results in better sound quality but increases the size of the file requires more storage as more samples need to be stored. However the sound is closer to the original analogue wave. |