Download presentation
Presentation is loading. Please wait.
1
Representing Information as Bit Patterns Lecture 4 CSCI 1405, CSCI 1301 Introduction to Computer Science Fall 2009
2
Representing Text Each of the different symbols in the text is assigned a unique bit pattern 1.American Standard code for Information Interchange (ASCII Code): 1 byte- 256 different patterns 2.Unicode Code: 2 bytes- 65,535 different patterns 3.ISO Code: 4 Bytes- Billions of different patterns
3
Representing Numeric Values Store numeric information in a form of binary notation such as (2’complement, floating point) These notations are built on the basis of binary system
4
Binary System –Represent quantities: ex: (00011111) 2 = (32) 10 –Has only two digits 0 and 1 –The binary number is a weighted number –The position of the 0 or 1 indicates its weight or value within the number –Right most bit= least significant bit LSB: has a weight of 2 0 –Left most bit= most significant bit MSB –The weights increase from right to left
5
Counting in Binary Decimal SystemBinary System01 210 311 4100 5101 6110 7111 With n numbers of bits you can count up to a number equals to 2 n -1
6
Binary Fractions Binary fraction number are placed to the right of the binary point MSB of binary fraction number has a weight of 2 -1 ex: (.0101) 2 = (.3125) 10 MSB
7
Binary to Decimal 2020 21212 2323 2424 2525 2626 1011011 104803264 (1101101) 2 = 64+32+8+4+1= (109) 10
8
Binary to Decimal 2 -4 2 -3 2 -2 2 -1 1101..0625.1250.5 (.1011) 2 = 0.5+0.125+0.0625= (0.6875( 10
9
Decimal to Binary 1.Sum of Weights Method As described before
10
Decimal to Binary 19=19/2 14=9/2 02=4/2 01=2/2 10=1/2 LSBMSB (19) 10 = (10011) 2 Remainder
11
Decimal to Binary 0.625X 2 =.3125 11.25X 2 =.625 0.5X 2 =.25 11.00X 2 =.5 LSBMSB (.3125) 10 = (.0101) 2 Carry
12
Thank You
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.