Lecture02_handout-F09

Lecture02_handout-F09 - CE-320 Microcomputers I Fall B 2009...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
CE-320 Microcomputers I Fall B 2009 Lecture 2 Page 1 Lecture 2 Binary and Hexadecimal Numbers Purpose: Review binary and hexadecimal number representations Convert directly from one base to another base Review addition and subtraction in binary representations Determine overflow in unsigned and signed binary addition and subtraction
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CE-320 Microcomputers I Fall B 2009 Lecture 2 Page 2 The Need for Other Bases Humans are used to the decimal number system, also called radix-10 or base-10. To state the obvious, base-10 means that a digit has one of ten possible values, 0 through 9. In computers, numbers are stored in binary, also called radix-2 or base-2, using arrays of flip-flops. Each digit may take one of two values, either 0 or 1. Long strings of these 1’s and 0’s are cumbersome to use, so we will usually represent binary numbers using hexadecimal, also called radix-16 or base-16. It is important to note that no computer actually stores values in hardware using hexadecimal. This number system is only a convenience for humans. All of these number systems are positional.
Background image of page 2
CE-320 Microcomputers I Fall B 2009 Lecture 2 Page 3 Unsigned Decimal Numbers are represented using the digits 0, 1, 2, …, 9. Multi-digit numbers are interpreted as in the following example: 793 10 = Unsigned Binary Numbers are represented using the digits 0 and 1. Multi-digit numbers are interpreted as in the following example: 10111 2 = In binary, each digit is called a bit . Since we use binary to represent the values stored in a group of flip-flops, we usually specify a binary system by the number of bits (flip-flops) being used to store each number. When we write numbers in this system, we will write all bits, including leading 0’s. The number above is expressed in 5-bit binary. The number below is in 8-bit binary. 00010111 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CE-320 Microcomputers I Fall B 2009 Lecture 2 Page 4 Unsigned Hexadecimal Numbers are represented in hexadecimal using the digits 0, 1, 2, …, 9, A, B, …, F where the letters represent values: A=10, B=11, and so on to F=15. Note that this gives sixteen possible values for each digit. Multi- digit numbers are interpreted as in the following example: 76CA 16 = Notes on Bases Since all three number bases will be used, including the correct subscript when a number is written out of context is mandatory. Pronunciation Words like “ten,” “twenty,” and “one-thousand” refer to specific numbers of items, regardless of how the numbers are written. To avoid confusion, binary and hexadecimal numbers are spoken by naming the digits followed by “binary” or “hexadecimal.” For example, 1000 16 is pronounced “one zero zero zero hexadecimal.” “One-thousand” is actually 3E8 16 .
Background image of page 4
Fall B 2009 Lecture 2 Page 5 Ranges of Unsigned Number Systems System Lowest Highest Number of Values 4-bit binary (1-digit hex) 8-bit binary (1 byte) (2-digit hex) 16-bit binary (2 bytes) (4-digit hex) n-bit binary
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 11/12/2009.

Page1 / 17

Lecture02_handout-F09 - CE-320 Microcomputers I Fall B 2009...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online