Download presentation
Presentation is loading. Please wait.
Published byDoris Pitts Modified over 9 years ago
1
Number Systems 2.1 Information Storage Why not decimal numbers in computers ? Difficult to store ENIAC (1 st electronic computer) used 10 vacuum tubes Difficult to transmit Messy for digital logic functions Addition, multiplication, etc.
2
Binary Representations Electronic Implementation – Easy to store with bistable elements – Reliably transmitted on noisy and inaccurate wires – Straightforward implementation of arithmetic functions 0.0V 0.5V 2.8V 3.3V 010
3
Binary to Decimal Multiply positional weights by digits and add – 1 1 1 1 0 – 2 4 2 3 2 2 2 1 2 0 – Resulting decimal number represents the value
4
Decimal to Binary Decimal number D to base-2 number X – Continue dividing D by 2 – Take the last quotient and all remainder – 30 10 -> 11110 2 30 15 -- 0 7 -- 1 3 -- 1 1 -- 1
5
Other Number System ? base 12 base 16 base 60 ? – http://en.wikipedia.org/wiki/Sexagesimal
6
Bases 2, 8, 16, etc. 3 binary bits into a single octal 4 binary bits into a single hex 11110 2 36 8 1E X Use characters ‘0’ to ‘9’ and ‘A’ to ‘F’ Write FA1D37B 16 in C as 0xFA1D37B – Or 0xfa1d37b 000000 110001 220010 330011 440100 550101 660110 770111 881000 991001 A101010 B111011 C121100 D131101 E141110 F151111 Hex Decimal Binary
7
Letters ? ASCII byte/symbol Unicode 2 bytes/symbol http://www.unicode.or g/charts/ 100 00011016541A 100 00101026642B 100 00111036743C 100 01001046844D 100 01011056945E 100 01101067046F 100 01111077147G 100 10001107248H 100 10011117349I 100 1010112744AJ 100 1011113754BK 100 1100114764CL 100 1101115774DM 100 1110116784EN 100 1111117794FO 101 00001208050P 101 00011218151Q 101 00101228252R 101 00111238353S 101 01001248454T 101 01011258555U 101 01101268656V 101 01111278757W 101 10001308858X 101 10011318959Y 101 1010132905AZ
8
Machine Words Machine Has “Word Size” – Nominal size of integer-valued data Including addresses – Most current machines are 32 bits (4 bytes) Limits addresses to 4GB Becoming too small for memory-intensive applications – High-end systems are 64 bits (8 bytes) Potentially address 1.8 X 10 19 bytes – Machines support multiple data formats Fractions or multiples of word size Always integral number of bytes
9
Word-Oriented Memory Org. 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 32-bit Words BytesAddr. 0012 0013 0014 0015 64-bit Words Addr = ?? Addr = ?? Addr = ?? Addr = ?? Addr = ?? Addr = ?? 0000 0004 0008 0012 0000 0008 Addresses Specify Byte Locations – Address of first byte in word – Addresses of successive words differ by 4 (32-bit) or 8 (64-bit)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.