Chx-Implementation Considerations

# Chx-Implementation Considerations - Microcomputer Systems 1...

This preview shows pages 1–9. Sign up to view the full content.

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

View Full Document

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

View Full Document

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Microcomputer Systems 1 Implementation Considerations Data Representations & Arithmetic Fixed-Point Numbers and Arithmetic February 11, 2012 Veton Këpuska 3 Fixed-Point There are several different binary number systems. Most notable: 1. Sign Magnitude 2. One’s Complement 3. Two’s Complement Example of 4-bit signed numbers in three different formats February 11, 2012 Veton Këpuska 4 Binary Representations of 4-bit Signed Numbers Decimal Value Sign Magnitude One’s Complement Two’s Complement +7 111 111 111 +6 110 110 110 +5 101 101 101 +4 100 100 100 +3 011 011 011 +2 010 010 010 +1 001 001 001 +0 000 000 000-0 1 000 1 111--1 1 001 1 110 1 111-2 1 010 1 101 1 110-3 1 011 1 100 1 101-4 1 100 1 011 1 100-5 1 101 1 010 1 011-6 1 110 1 001 1 010-7 1 111 1 000 1 001-8-- 1 000 February 11, 2012 Veton Këpuska 5 Fixed-Point Representations Integers vs. Fractional Numbers Representations Notation: Qm.n Format: m – Number of bits to the left of the radix point n – number of bits to the right of the radix point Let N – total number of bits N=m+n+1 Signed, and N-bit signed number in Qm.n format with MSB as sign bit (b N-1 ) N=m+n Unsigned February 11, 2012 Veton Këpuska 6 Examples Q16.0 Format is Full unsigned integer number representation Q15.0 Format is Full signed integer number representation Q15.1 Format represents unsigned 16 bit integer value Q14.1 Format represents signed 15 bit integer value Q0.16 (or Q.16 or simply Q16) is a 16 bit format that for unsigned number that uses 16 bits for the fractional value. Q0.15(or Q.15 or simply Q15) is a 15 bit format that for signed number that uses 16 bits for the fractional value. Fractional Representations (e.g., Q1.15) have the advantage over the Full format representations that results of the multiplication are always smaller than either of the numbers QX.0 or QY.1 Formats must check for overflow and handle it Q0.X or Q1.Y Formats may lead to underflow but no special handling is required. February 11, 2012 Veton Këpuska 7 Fixed-Point Representations Integers vs. Fractional Numbers Representations Numbers represented as 16/32 bits: 2 16 =65,536 or 2 32 =4,294,967,296 bit patterns. 1. Unsigned Integer Format Stored Value: 16-bit: 0..65,536 or 32-bit: 0..4,294,967,296 1. Signed Integer Format Stored Value: 16-bit: -32,768..32,767 or 32-bit: -2,147,483,648..2,147,483647 1. Unsigned Fractional Format Stored Value: 16-bit: 0..1 (65,536 levels) or 32-bit: 0..1 (4,294,967,296 levels) 1. Signed Fractional Format Stored Value: 16-bit: -1..1 (65,536 levels) or 32-bit: -1..1 (4,294,967,296 levels) February 11, 2012 Veton Këpuska...
View Full Document

## This note was uploaded on 02/10/2012 for the course ECE 3551 taught by Professor Staff during the Spring '11 term at FIT.

### Page1 / 56

Chx-Implementation Considerations - Microcomputer Systems 1...

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

View Full Document
Ask a homework question - tutors are online