Download presentation
Presentation is loading. Please wait.
Published byMaurice Casey Modified over 8 years ago
1
1 COMS 161 Introduction to Computing Title: Computing Basics Date: September 8, 2004 Lecture Number: 7
2
2 Announcements Homework
3
3 Review Binary numbers 0 (2 number of bits – 1) Number representations –Signed magnitude Problems –Two values of 0 (+/- 0) –Arithmetic operations do not result in signed magnitude numbers –Two’s complement Used by virtually all computers today
4
4 Outline Finish Number Systems –Binary Coded Decimal (BCD) Computer System Basics
5
5 Two’s Complement Representation Sign bit in a sense –Positive numbers The leading bit (left most) is zero The same as signed magnitude –Negative numbers The leading bit is one Defined so that when added to their corresponding positive number the answer is zero
6
6 Bit PatternValueBit PatternValue 000001000-8 000111001-7 001021010-6 001131011-5 010041100-4 010151101-3 011061110-2 011171111 Two’s Complement Representation
7
7 Problems with signed magnitude representation are solved with the two’s complement representation –There is only value of zero –Arithmetic is correct Solution is in two’s complement form 2 – 1 = 2 + (-1) = 1
8
8 Binary Encoding Unsigned binary numbers are useful when labeling things Common grouping –4 bits: nibble –8 bits: byte One byte represents 256 different values or items
9
9 Binary Number System Letters in the English language –A = 65 10 = 0100 0001 2 –B = 66 10 = 0100 0010 2 – … –Z = 90 10 = 0101 1010 2 – … –a = 97 10 = 0110 0001 2 – … –Z = 122 10 = 0111 1010 2 –Numbers are still left over for punctuation
10
10 Binary Number System Precision –The number of bits used to represent an item Letter: precision of 8 bits Integer (whole number): precision of 32 or 64 bits –Letters and integer numbers are very precise Known bit pattern corresponds to a letter or number –Always finite Computers have finite precision –Presents some limitations
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.