Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Number Representation F451 Year 10 Computing Binary Numbers Binary Numbers Sign/Magnitude Sign/Magnitude 2s Complement 2s Complement Binary.

Similar presentations


Presentation on theme: "Introduction to Number Representation F451 Year 10 Computing Binary Numbers Binary Numbers Sign/Magnitude Sign/Magnitude 2s Complement 2s Complement Binary."— Presentation transcript:

1 Introduction to Number Representation F451 Year 10 Computing Binary Numbers Binary Numbers Sign/Magnitude Sign/Magnitude 2s Complement 2s Complement Binary Numbers Binary Numbers Sign/Magnitude Sign/Magnitude 2s Complement 2s Complement

2 BinaryBinary

3 BinaryBinary All computer processing is carried out digitally. This means that the processor handles instructions as binary codes – zeros and ones. All data on a PC is essentially 0’s and 1’s.

4 Converting binary into positive denary integers Whole positive denary (base ten) numbers are converted into binary as follows: 135 from denary into binary 128 + 4 + 2 + 1 = 135 1286432168421MSBMSBLSBLSB 10000111

5 The repeated division method A method for converting denary to binary: 98 in denary into binary: 98 divide by 2 = 49 remainder 0 49 divide by 2 = 24 remainder 1 24 divide by 2 = 12 remainder 0 12 divide by 2 = 6 remainder 0 6 divide by 2 = 3 remainder 0 3 divide by 2 = 1 remainder 1 1 divide by 2 = 0 remainder 1 0 divide by 2 = 0 remainder 0 Read the binary code from the remainder from bottom to the top: 01100010 which equals 98 DIVMODDIVMOD

6 Binary Coded Decimal (BCD) BCD represents denary integers using blocks of four binary digits. Each block of four is converted and the denary values are then read off: 1001 0011 1000938 Therefore 1001 0011 1000 in BCD = 938 in denary.84211001 8 + 0 + 0 + 1 9 84210011 0 + 0 + 2 + 1 384211000 8 + 0 + 0 + 0 8

7 Uses of BCD BCD enables fast conversions from denary to binary for applications such as pocket calculators. Each digit on a calculator corresponds directly to a four-bit block in BCD.

8 Storing Negative Integers 1 method is Sign/Magnitude6432168421128+/- MSBMSB 01001011 75 -75 1 1 is a Negative, 0 is a Positive

9 Sign/MagnitudeSign/Magnitude This method has some limitations 2 types of data in the same value (MSB is a sign) Makes calculations difficult by losing 1 bit6432168421+/- 01001011 127 maximum number SignSign Value or Magnitude

10 Storing Negative Integers Another method is 2s Complement6432168421128 -128 10110101 -75 -128+32+16+4+1=-75

11 2s Complement Conversion -117 -117 Stage 1 : work out 117 in binary Stage 1 : work out 117 in binary-12864321684211000101 Stage 2 : Reverse the 0’s and 1’s Stage 2 : Reverse the 0’s and 1’s128643216842101110101 Stage 3 : Plus 1 Stage 3 : Plus 1 10

12 Representing characters There are three main coding systems that provide conversions of keyboard characters into binary: –EBCDIC –ASCII –UNICODE

13 EBCDICEBCDIC EBCDIC stands for Extended Binary Coded Decimal Interchange Code. It is an extension of BCD which includes non-numeric characters, including all the keyboard characters and special characters. It is commonly used to encode data onto magnetic tape.

14 ASCIIASCII ASCII stands for the American Standard Code for Information Interchange. It has been adopted as the industry- standard way of representing keyboard characters as binary codes. Every keyboard character is given a corresponding binary code. ASCII uses an 8-bit code to provide 256 characters.

15 UNICODEUNICODE UNICODE is the new standard to emerge that is replacing ASCII. It has been adopted by many of the big businesses in the computing industry. It is designed to cover more of the characters that are found in languages across the world. It has become important due to the increased use of the Internet, as more data is being passed around globally.


Download ppt "Introduction to Number Representation F451 Year 10 Computing Binary Numbers Binary Numbers Sign/Magnitude Sign/Magnitude 2s Complement 2s Complement Binary."

Similar presentations


Ads by Google