DOC PREVIEW
TAMU CSCE 110 - 03-numberRepresentation
Type Miscellaneous
Pages 22

This preview shows page 1-2-21-22 out of 22 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Computer OrganizationHigh Level View Of A ComputerGetting Data InSlide 4Getting Data OutSlide 6Unit of StorageHow Data Is StoredHow Data Is StoredBinary NumbersConverting Binary to Base 10Converting Base 10 to BinarySlide 13Other common number representations__________ NumbersRepresenting ________ Numbers_____________________________________________Real (____________) numbersLimitations of Finite Data EncodingsLimitations of Finite Data ExchangeSlide 22J. Michael MooreComputer OrganizationCPSC 110J. Michael MooreHigh Level View Of A ComputerProcessorInput OutputMemoryStorageJ. Michael MooreGetting Data InInputOthers?J. Michael MooreProcessorInput OutputMemoryStorageJ. Michael MooreGetting Data OutOutputOthers?J. Michael MooreProcessorInput OutputMemoryStorageJ. Michael MooreUnit of Storage•___–_____ ______–Smallest unitof measurementMemoryStorageTwo possiblevalueson offORJ. Michael MooreHow Data Is Stored•___: a group of 8 bits; 28=256 possibilities–00000000, 00000001, 00000010, 00000011, … , 11111111•___________: long sequence of locations, each large enough to hold one byte, numbered 0, 1, 2, 3, …•___________: The number of the locationJ. Michael MooreHow Data Is Stored•Contents of a location can change–e.g. 01011010 can become 11100001•Use consecutive locations to store longer sequences–e.g. 4 bytes = 1 word1 1 0 1 1 0 1 0 0 0 1 1 1 0 1 1 0 0 1 0 0 1 003...bytes0 1 2bitsJ. Michael MooreBinary Numbers•Base Ten Numbers (Integers)–characters•0 1 2 3 4 5 6 7 8 9–5401 is 5x103 + 4x102 + 0x101 + 1x100•Binary numbers are the same–characters•0 1–1011 is 1x23 + 0x22 + 1x21 + 1x20J. Michael MooreConverting Binary to Base 10•23 = 8•22 = 4•21 = 2•20 = 11. 10012 = ____10 =2. 1x23 + 0x22 + 0x21+ 1x20 =3. 1x8 + 0x4 + 0x2 + 1x1 =4. 8 + 0 + 0 + 1 =5. 910•01102 = ____10 (Try yourself)•01102 = 610J. Michael MooreConverting Base 10 to Binary•28 = 256•27 = 128•26 = 64•25 = 32•24 = 16•23 = 8•22 = 4•21 = 2•20 = 1•38810 = ____2 2827262425222320211 1 10 00 0 00•388 - 256 (28) = 132•132 - 128 (27) = 4•4 - 4 (22) = 0J. Michael MooreConverting Base 10 to Binary•38810 = ____2 •38810 / 2 = 19410 Remainder 0•19410 / 2 = 9710 Remainder 0•9710 / 2 = 4810 Remainder 1•4810 / 2 = 2410 Remainder 0•2410 / 2 = 1210 Remainder 0•1210 / 2 = 610 Remainder 0•610 / 2 = 310 Remainder 0•310 / 2 = 110 Remainder 1•110 / 2 = 010 Remainder 12827262425222320211 1 10 00 0 00J. Michael MooreOther common number representations•_____________ Numbers–characters•0 1 2 3 4 5 6 7 8–7820 is 7x83 + 8x82 + 2x81 + 0x80•_____________ Numbers–characters•0 1 2 3 4 5 6 7 8 9 A B C D E F–2FD6 is 2x163 + Fx162 + Dx161 + 6x160J. Michael Moore__________ Numbers•Can we store a __________ sign?•What can we do?–Use a ____•Most common is ____________________J. Michael MooreRepresenting ________ Numbers•____________________________–flip all the bits•change 0 to 1 and 1 to zero–add 1–if the leftmost bit is __, the number is __ or _______________–if the leftmost bit is __, the number is _______________J. Michael Moore______________________•What is -9?–9 is 00001001 in binary–flip the bits → 11110110–add 1 → 11110111•Addition and Subtraction are easy–always additionJ. Michael Moore_______________________•Addition–13 - 9 = 4–13 + (-9) = 4–00001101 + 11110111 = ?00 100 0 0 11110101 1 1 11 1 11011 1 10000 4=1This bit is lostBut that doesn’t matter since we get the correct answer anywayJ. Michael MooreReal (____________) numbers•Break the bits used into parts0110101000000011________ ________Sign bitsJ. Michael MooreLimitations of Finite Data Encodings•__________ - number is too large–suppose 1 byte stores integers in base 2, from 0 (00000000) to 255 (11111111) (note: this is not ___________________ although it would have the same problem)–if the byte holds 255, then adding 1 to it results in __, not _____J. Michael MooreLimitations of Finite Data Exchange•___________ Error–Insufficient ___________ (size of word)•ex. Try to store 1/8, which is 0.001 in binary, with only two bits–______________ expansions in current base•ex. Try to store 1/3 in base 10, which is 0.3333…–______________ expansions in every base•ex. Irrational numbers such as J. Michael MooreProcessorInput


View Full Document

TAMU CSCE 110 - 03-numberRepresentation

Type: Miscellaneous
Pages: 22
Documents in this Course
06-IO

06-IO

29 pages

21-OOP

21-OOP

8 pages

key

key

6 pages

21-OOP

21-OOP

8 pages

Load more
Download 03-numberRepresentation
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view 03-numberRepresentation and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view 03-numberRepresentation 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?