Download presentation
Presentation is loading. Please wait.
1
Computer Organization
CSCE 110 J. Michael Moore
2
High Level View Of A Computer
Memory Input Processor Output Storage J. Michael Moore
3
Getting Data In Input Others? J. Michael Moore
4
Memory Input Processor Output Storage J. Michael Moore
5
Getting Data Out Output Others? J. Michael Moore
6
Memory Input Processor Output Storage J. Michael Moore
7
Unit of Storage Bit Two possible values OR Binary digit
Memory Bit Binary digit Smallest unit of measurement Two possible values off OR on Storage J. Michael Moore
8
How Data Is Stored Byte: a group of 8 bits; 28=256 possibilities
, , , , … , Memory: long sequence of locations, each large enough to hold one byte, numbered 0, 1, 2, 3, … Address: The number of the location J. Michael Moore
9
How Data Is Stored Contents of a location can change
bits 1 1 2 3... bytes Contents of a location can change e.g can become Use consecutive locations to store longer sequences e.g. 4 bytes = 1 word J. Michael Moore
10
Binary Numbers Base Ten Numbers (Integers) Binary numbers are the same
characters 5401 is 5x x x x100 Binary numbers are the same 0 1 1011 is 1x23 + 0x22 + 1x21 + 1x20 J. Michael Moore
11
Converting Binary to Base 10
23 = 8 22 = 4 21 = 2 20 = 1 10012 = ____10 = 1x23 + 0x22 + 0x21+ 1x20 = 1x8 + 0x4 + 0x2 + 1x1 = = 910 01102 = ____10 (Try yourself) 01102 = 610 J. Michael Moore
12
Converting Base 10 to Binary
28 = 256 27 = 128 26 = 64 25 = 32 24 = 16 23 = 8 22 = 4 21 = 2 20 = 1 38810 = ____2 (28) = 132 (27) = 4 4 - 4 (22) = 0 28 27 26 24 25 22 23 20 21 1 1 1 J. Michael Moore
13
Converting Base 10 to Binary
38810 = ____2 38810 / 2 = 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 28 27 26 24 25 22 23 20 21 110 / 2 = 010 Remainder 1 1 1 1 J. Michael Moore
14
Other common number representations
Octal Numbers characters 7820 is 7x83 + 8x82 + 2x81 + 0x80 Hexadecimal Numbers A B C D E F 2FD6 is 2x163 + Fx162 + Dx x160 J. Michael Moore
15
Negative Numbers Can we store a negative sign? What can we do?
Use a bit Most common is two’s complement J. Michael Moore
16
Representing Negative Numbers
Two’s Complement flip all the bits change 0 to 1 and 1 to zero add 1 if the leftmost bit is 0, the number is 0 or positive if the leftmost bit is 1, the number is negative J. Michael Moore
17
Two’s Complement What is -9? Addition and Subtraction are easy
9 is in binary flip the bits add Addition and Subtraction are easy always addition J. Michael Moore
18
Two’s Complement 1 1 1 = 4 Addition 13 - 9 = 4 13 + (-9) = 4
= ? But that doesn’t matter since we get the correct answer anyway 1 1 1 1 1 1 1 1 1 1 This bit is lost 1 = 4 J. Michael Moore
19
Real (Floating point) numbers
Break the bits used into parts Sign bits Mantissa Exponent J. Michael Moore
20
Limitations of Finite Data Encodings
Overflow - number is too large suppose 1 byte stores integers in base 2, from 0 ( ) to 255 ( ) (note: this is not two’s complement although it would have the same problem) if the byte holds 255, then adding 1 to it results in 0, not 256 J. Michael Moore
21
Limitations of Finite Data Exchange
Roundoff Error Insufficient precision (size of word) ex. Try to store 1/8, which is in binary, with only two bits Nonterminating expansions in current base ex. Try to store 1/3 in base 10, which is … Nonterminating expansions in every base ex. Irrational numbers such as J. Michael Moore
22
Memory Input Processor Output Storage J. Michael Moore
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.