Computing#4-Data Representation Flashcards
Logic gates
And, Or, Not.
And-both inputs must be on(1)
Or-Only one input needs to be on(1)
Not-Switches the input(eg. If input is 1, it becomes 0, vice versa)
2-level logic circuits are circuits in which inputs must pass through a maximum of 2 logic gates to reach the output.
State units for digital information
Bit(b)-single binary digit(1 or 0) Nibble-4 bits Byte(B)-8 bits Kilobyte(KB)-1024 bytes Megabyte(MB)-1024 Kilobytes Gigabyte(GB)-1024 Megabytes Terabyte(TB)-1024 Gigabytes Petabyte(PB)-1024 Terabytes Exabytes(EB)-1024 Petabytes Zettabytes(ZB)-1024 Exabytes Yottabytes(YB)-1024 Zettabytes
Binary numbers
Our number system is called Denary. We can convert between denary and binary by drawing a table starting with 1 and keep doubling. This can count any number. Start at the left, and subtract the number in each column until your number is converted to binary
Logic
Logic consists of Logic gates which are special circuits built into computer chips. These can combined for complex operations.
Info about units of data
A byte can store a character
Most files such as songs pictures and docs are measured in kB or MB
High def vids and complex apps are often measured in gigabytes
Secondary storage is measured in gigabytes or terabytes
Hexadecimals
Multiplication tables for go up in powers of 16 from right to left, eg, 4096,256,16,1
Hex values go from 0-9 then 10-15 is A-F.
Hex
Hex uses 16 different digits to represent 0-15. This can be represented by 4 bits in binary, so each hex is a nibble. To convert from binary to hex just split it into nibbles and assign.
Characters
Alphanumeric letters are used to make words and strings
Computers can’t interpret these, so it uses character sets.
When you click a keyboard, it sends a series of binary signals which the computer translates using a character set.
ASCII and Unicode are standard more.
ASCII
Commonly used character set. Assigns 7 bit binary code to each ASCII character. This creates 128 different characters. Each code has a big added to the front( a 0) so each character fits nicely into a byte. It’s main purpose is to parity check.
Letters and numbers are ordered(each decimal number assigned increases by one, this how u identify other ASCII characters when only given one), while symbols are scattered.
Unicode
Covers ever possible character that might be written. It uses multiple bytes for each character. First 128 codes are identical to ASCII.
Why do we compress files
Compression is when files are made smaller while making the compressed file as true to the original.
Uses:
Smaller files take less storage
Streaming takes less time as it takes lower bandwidth
Allows webpages to be loaded quicker
Email services have restrictions on file size sendable, compression allows it to still send the file.
Lossy compression benefits
Reduced file size
Less bandwidth(amount of data that can be transferred on a network in a given time)
Commonly used-many software can read lossy files
Lossy compression cons
Loses data, file won’t be the same as original
Can’t be used on software or text files as these need to retain all the info of the original
Types of lossy compression
MP3(audio)
AAC(audio)
JPEG(image)
Lossless compression
Does not remove the data permanently, only removed temporarily, no reduction in quality so compressed file should look and sound like the original.
Can be decompressed
Can be used on both text and image files.