Nội dung text Secret sauce P1 final.pdf
Zain Merchant SECRET SAUCE AL - Paper 1
Zain Merchant INFORMATION REPRESENTATION Number representation 2 The denary value in each group of 4 bits is greater than 9 // the denary value in each nibble is greater than 9 Why can’t a value be interpreted as BCD • Straightforward to convert to / from BCD and denary so it is less complex to encode and decode for programmers • easier for digital equipment use BCD to display output information • can represent monetary values exactly Benefits of BCD An application that performs financial / banking calculations because it is difficult to represent decimal values exactly in normal binary and financial transactions use only two decimal places and must be accurate, no accumulating errors Or Electronic displays, e.g. calculators, digital clocks because visual displays only need to show individual digits because conversion between denary and BCD is easier Or The storage of the date and time in the BIOS of a PC because conversion with denary is easier Practical application of BCD CSWithZa CSWithZa CSWithZa CSWithZa
Zain Merchant 3 Smallest: 10000000 Largest: 01111111 Smallest and largest 8 bit two’s complement binary number The result is a larger number than can be stored in the given number of bits. How an overflow can occur while adding integers one tebibyte is 1024 gibibytes and one terabyte is 1000 gigabytes Difference between tebibyte and terabyte Kibibyte is 1024 bytes and kilobyte is 1000 bytes Kibibyte is binary prefix and kilobyte is denary prefix Difference between kibibyte and kilobyte CSWithZa CSWithZa CSWithZa CSWithZa
Zain Merchant INFORMATION REPRESENTATION Text 4 • All of the characters/symbols that the computer can use/represent • Each character has a unique number/binary number/hexadecimal number Character set • ASCII has 7 bits whereas UNICODE has 16 bits • Extended ASCII has 8 bits whereas UNICODE has 16 bits • ASCII has 7 bits whereas extended ASCII has 8 bits • Unicode can represent more characters than ASCII/Extended// by example • Extended ASCII can represent more characters than ASCII ASCII vs Extended ASCII vs UNICODE • Each character has its own unique code • Each character in the word is replaced by its code • The codes are stored in the order in the word How is a word represented by ASCII CSWithZa CSWithZa CSWithZa CSWithZa