Chx-Implementation Considerations

Chx-Implementation Considerations - Microcomputer Systems 1...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
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 Kpuska 3 Fixed-Point There are several different binary number systems. Most notable: 1. Sign Magnitude 2. Ones Complement 3. Twos Complement Example of 4-bit signed numbers in three different formats February 11, 2012 Veton Kpuska 4 Binary Representations of 4-bit Signed Numbers Decimal Value Sign Magnitude Ones Complement Twos 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 Kpuska 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 Kpuska 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 Kpuska 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 Kpuska...
View Full Document

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 Right Arrow Icon
Ask a homework question - tutors are online