Title | Week 2 - Digital Data Representation |
---|---|
Author | Kristen ga |
Course | Computer Architecture |
Institution | Sheridan College |
Pages | 4 |
File Size | 236.1 KB |
File Type | |
Total Downloads | 21 |
Total Views | 138 |
Digital Data Representation...
Computer Architecture Week 2 - Digital Data Representation Digital representation - When you order something at Tim Hortons the machine/computer has to calculate your total amount Numbering Systems: Decimal System o As human beings, we use (decimal) numbering system o Base 10 (0-9) - Binary System o Computers use -- from the on/off switch o binary Base2 (0 and 1) - Hexadecimal System o Hex base 16 (0-15) o Also add A, B, C, D, E, F - Octal System o Octal base 8 (0-7) Used in CHMOD 777 - Unary System o UNARY base1 1, 11, 111, 1111, 1111 how elementary school kids learned to add **will be getting a reference sheet for the exam ** max number without a calculator (so for an exam) the highest number will be decimal 999 -
Decimal to Binary
-
Method 1: Successive Division by 2 o Bottom to top (referring from table) o Can make mistakes with this method o Takes a long time
-
Method 2: The Powers of 2
Binary to Decimal
Binary to Hexadecimal - Method: Hexadecimal o Divide by 16 o To make it easier convert the decimal number to binary and then convert to Hexadecimal This way you don’t have to divide by 16 o From right to lef
Digital Data Representations - Computers can store and work with many different kinds of information - Numbers (integers) o Signed integers Whole numbers plus negative numbers Two ways to represent signed integers: Sign-magnitude o Your first bit (lef most bit) o 8-bit representation (byte) Two’s compliment (-128 to 127) -2(n-2) to 2(n-1) - 2 o Most commonly used in computers o First convert the number to binary o Flip all zeros into 1 and 1’s into zeros (flip bits) 0000 0001 1111 1110 o add 1 1111 1111 o (use minimum of 8 bits) o works for negative numbers **if the number is Positive only do step 1!!!!! o Unsigned integers Whole numbers: Only zero and positive numbers Range: 0 - 255 Non-numeric Data Types - Text - Images o Still and moving o Images use a dot or a pixel o Images get stored in a computer’s memory as numbers o Each number represents a dot or pixel of the image o Also uses colour RGB - Movies o Moving images o Sequence of still images called frames - Music/audio o Represented as a sequence of numbers in computer memory o Ofen stored in compressed formats MP3, AAC, FLAC - Therefore, the CPU must be able to work with this data
Data Compression - Images, audio, and video data take up a lot of memory or disk space unless it is compressed - Two types of compression o Lossless Reduces the size of data without losing or changing any information (data)
o
Lossy
The result is a stream of bytes that can be stored in memory, saved in a disk file, or transmitted over the internet Decompression restores the original data EXACTLY for example: ZIP files Compression Ratio Describes the effectiveness of the compression method Ratio of 2:1 the compressed data is half the original size Ratio of 10:1 means one tenth of the original size Ratio of 1:1 no reduction in size **Unfortunately, lossless type does not work very well for video and audio data Change or discard some of the data in a way that is hard for the human senses to notice Compression ratios can be impressively high Typical ratio for JPEG: 10:1 or 20:1 Typical ratio for MP2/ACC music are about 10:1 MPEG-4 video compression ratio: 100:1 to 200:1 The algorithm usually includes an encoding quality or bit rate parameter Higher quality lower compression ratio (higher bit rate) Lower quality higher compression ratio (lower bit rate) Effects of lower quality? Blocky or grainy images/video Music: unclear high end (“sizzle”), less stereo separation, distortion...