- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Qm.n format
Several of the primitives require a fractional interpretation of the integer input and/or output arguments. The Qm.n format provides a standard mechanism for representing fractional values using an integer data type. For example, a Q3.4 word is illustrated in Figure 1-1. The integer binary word has been partitioned using an imaginary fixed point. The n-bits to the right of the imaginary point comprise the fractional portion of the value being represented, and these n-bits act as weights for negative powers of 2. The m-bits to the left of the imaginary point comprise the integer portion of the value being represented, and these m-bits act as weights for positive powers of 2. The overall signed Qm.n representation requires a total of m+n+1 bits, with the additional bit required for the sign. As shown in Figure 1-1, the Q3.4 word requires a total of 3+4+1 = 8 bits. The dynamic range for the Q3.4 word spans the open interval [-8, 8), and the precision (or quantization error) is 1/16. The value represented by a particular set of Q3.4 bits is given by the adding up the weighted powers of 2: see picture attached.
Regards,
Vladimir
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page