Difference between revisions of "Template:Densely packed decimal"

From blackwiki
Jump to navigation Jump to search
(Undid revision 620789947 by User:Dazitzel; it seems unnecessarily verbose., as the control bits are already quite prominently displayed. Underlined (8-9) to make things even clearer.)
Line 4: Line 4:
 
!scope="col" colspan="10"| DPD encoded value
 
!scope="col" colspan="10"| DPD encoded value
 
|rowspan="10"|
 
|rowspan="10"|
!scope="col" colspan="6"| Decimal digits
+
!scope="col" colspan="5"| Decimal digits
 
|-
 
|-
 
!scope="col"| b9 !!scope="col"| b8 !!scope="col"| b7 !!scope="col"| b6 !!scope="col"| b5
 
!scope="col"| b9 !!scope="col"| b8 !!scope="col"| b7 !!scope="col"| b6 !!scope="col"| b5
Line 10: Line 10:
 
!scope="col"| d2 !!scope="col"| d1 !!scope="col"| d0
 
!scope="col"| d2 !!scope="col"| d1 !!scope="col"| d0
 
!scope="col"| Values encoded
 
!scope="col"| Values encoded
!scope="col"| Control
 
 
!scope="col"| Description
 
!scope="col"| Description
 
|-
 
|-
|style="background:#cef2e0"|a||style="background:#cef2e0"|b||style="background:#cef2e0"|c||style="background:#cedff2"|d||style="background:#cedff2"|e||style="background:#cedff2"|f||'''0'''||style="background:#ddcef2"|g||style="background:#ddcef2"|h||style="background:#ddcef2"|i||style="background:#cef2e0"|0'''abc'''||style="background:#cedff2"|0'''def'''||style="background:#ddcef2"|0'''ghi'''||(0–7) (0–7) (0–7) || b3=0<br/>Three small digits ||
+
|style="background:#cef2e0"|a||style="background:#cef2e0"|b||style="background:#cef2e0"|c||style="background:#cedff2"|d||style="background:#cedff2"|e||style="background:#cedff2"|f||'''0'''||style="background:#ddcef2"|g||style="background:#ddcef2"|h||style="background:#ddcef2"|i||style="background:#cef2e0"|0'''abc'''||style="background:#cedff2"|0'''def'''||style="background:#ddcef2"|0'''ghi'''||(0–7) (0–7) (0–7) || Three small digits
 
|- style="background:#f2f2f2"
 
|- style="background:#f2f2f2"
|style="background:#cef2e0"|a||style="background:#cef2e0"|b||style="background:#cef2e0"|c||style="background:#cedff2"|d||style="background:#cedff2"|e||style="background:#cedff2"|f||'''1'''||'''0'''||'''0'''||style="background:#ddcef2"|i||style="background:#cef2e0"|0'''abc'''||style="background:#cedff2"|0'''def'''||style="background:#ddcef2"|100'''i'''||(0–7) (0–7) (8–9) ||rowspan=3| b3=1, b2b1≠11<br/>Two small digits,<br/>one large || b2b1=00, d0=large
+
|style="background:#cef2e0"|a||style="background:#cef2e0"|b||style="background:#cef2e0"|c||style="background:#cedff2"|d||style="background:#cedff2"|e||style="background:#cedff2"|f||'''1'''||'''0'''||'''0'''||style="background:#ddcef2"|i||style="background:#cef2e0"|0'''abc'''||style="background:#cedff2"|0'''def'''||style="background:#ddcef2"|100'''i'''||(0–7) (0–7) {{Uu|(8–9)}} ||rowspan=3| Two small digits,<br/>one large
 
|- style="background:#f2f2f2"
 
|- style="background:#f2f2f2"
|style="background:#cef2e0"|a||style="background:#cef2e0"|b||style="background:#cef2e0"|c||style="background:#ddcef2"|g||style="background:#ddcef2"|h||style="background:#cedff2"|f||'''1'''||'''0'''||'''1'''||style="background:#ddcef2"|i||style="background:#cef2e0"|0'''abc'''||style="background:#cedff2"|100'''f'''||style="background:#ddcef2"|0'''ghi'''||(0–7) (8–9) (0–7) || b2b1=01, d1=large
+
|style="background:#cef2e0"|a||style="background:#cef2e0"|b||style="background:#cef2e0"|c||style="background:#ddcef2"|g||style="background:#ddcef2"|h||style="background:#cedff2"|f||'''1'''||'''0'''||'''1'''||style="background:#ddcef2"|i||style="background:#cef2e0"|0'''abc'''||style="background:#cedff2"|100'''f'''||style="background:#ddcef2"|0'''ghi'''||(0–7) {{Uu|(8–9)}} (0–7)
 
|- style="background:#f2f2f2"
 
|- style="background:#f2f2f2"
|style="background:#ddcef2"|g||style="background:#ddcef2"|h||style="background:#cef2e0"|c||style="background:#cedff2"|d||style="background:#cedff2"|e||style="background:#cedff2"|f||'''1'''||'''1'''||'''0'''||style="background:#ddcef2"|i||style="background:#cef2e0"|100'''c'''||style="background:#cedff2"|0'''def'''||style="background:#ddcef2"|0'''ghi'''||(8–9) (0–7) (0–7) || b2b1=10, d2=large
+
|style="background:#ddcef2"|g||style="background:#ddcef2"|h||style="background:#cef2e0"|c||style="background:#cedff2"|d||style="background:#cedff2"|e||style="background:#cedff2"|f||'''1'''||'''1'''||'''0'''||style="background:#ddcef2"|i||style="background:#cef2e0"|100'''c'''||style="background:#cedff2"|0'''def'''||style="background:#ddcef2"|0'''ghi'''||{{Uu|(8–9)}} (0–7) (0–7)
 
|-
 
|-
|style="background:#ddcef2"|g||style="background:#ddcef2"|h||style="background:#cef2e0"|c||'''0'''||'''0'''||style="background:#cedff2"|f||'''1'''||'''1'''||'''1'''||style="background:#ddcef2"|i||style="background:#cef2e0"|100'''c'''||style="background:#cedff2"|100'''f'''||style="background:#ddcef2"|0'''ghi'''||(8–9) (8–9) (0–7) ||rowspan=3| b3=1, b2b1=11, b6b5≠11<br/>One small digit,<br/>two large || b6b5=00, d0=small
+
|style="background:#ddcef2"|g||style="background:#ddcef2"|h||style="background:#cef2e0"|c||'''0'''||'''0'''||style="background:#cedff2"|f||'''1'''||'''1'''||'''1'''||style="background:#ddcef2"|i||style="background:#cef2e0"|100'''c'''||style="background:#cedff2"|100'''f'''||style="background:#ddcef2"|0'''ghi'''||{{Uu|(8–9)}} {{Uu|(8–9)}} (0–7) ||rowspan=3| One small digit,<br/>two large
 
|-
 
|-
|style="background:#cedff2"|d||style="background:#cedff2"|e||style="background:#cef2e0"|c||'''0'''||'''1'''||style="background:#cedff2"|f||'''1'''||'''1'''||'''1'''||style="background:#ddcef2"|i||style="background:#cef2e0"|100'''c'''||style="background:#cedff2"|0'''def'''||style="background:#ddcef2"|100'''i'''||(8–9) (0–7) (8–9) || b6b5=01, d1=small
+
|style="background:#cedff2"|d||style="background:#cedff2"|e||style="background:#cef2e0"|c||'''0'''||'''1'''||style="background:#cedff2"|f||'''1'''||'''1'''||'''1'''||style="background:#ddcef2"|i||style="background:#cef2e0"|100'''c'''||style="background:#cedff2"|0'''def'''||style="background:#ddcef2"|100'''i'''||{{Uu|(8–9)}} (0–7) {{Uu|(8–9)}}
 
|-
 
|-
|style="background:#cef2e0"|a||style="background:#cef2e0"|b||style="background:#cef2e0"|c||'''1'''||'''0'''||style="background:#cedff2"|f||'''1'''||'''1'''||'''1'''||style="background:#ddcef2"|i||style="background:#cef2e0"|0'''abc'''||style="background:#cedff2"|100'''f'''||style="background:#ddcef2"|100'''i'''||(0–7) (8–9) (8–9) || b6b5=10, d2=small
+
|style="background:#cef2e0"|a||style="background:#cef2e0"|b||style="background:#cef2e0"|c||'''1'''||'''0'''||style="background:#cedff2"|f||'''1'''||'''1'''||'''1'''||style="background:#ddcef2"|i||style="background:#cef2e0"|0'''abc'''||style="background:#cedff2"|100'''f'''||style="background:#ddcef2"|100'''i'''||(0–7) {{Uu|(8–9)}} {{Uu|(8–9)}}
 
|- style="background:#f2f2f2"
 
|- style="background:#f2f2f2"
|x||x||style="background:#cef2e0"|c||'''1'''||'''1'''||style="background:#cedff2"|f||'''1'''||'''1'''||'''1'''||style="background:#ddcef2"|i||style="background:#cef2e0"|100'''c'''||style="background:#cedff2"|100'''f'''||style="background:#ddcef2"|100'''i'''||(8–9) (8–9) (8–9) || b3=1, b2b1=11, b6b5=11<br/>Three large digits ||
+
|x||x||style="background:#cef2e0"|c||'''1'''||'''1'''||style="background:#cedff2"|f||'''1'''||'''1'''||'''1'''||style="background:#ddcef2"|i||style="background:#cef2e0"|100'''c'''||style="background:#cedff2"|100'''f'''||style="background:#ddcef2"|100'''i'''||{{Uu|(8–9)}} {{Uu|(8–9)}} {{Uu|(8–9)}} || Three large digits
 
|}<noinclude>
 
|}<noinclude>
  

Revision as of 02:27, 3 May 2015

Densely packed decimal encoding rules[1]
DPD encoded value Decimal digits
b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 d2 d1 d0 Values encoded Description
a b c d e f 0 g h i 0abc 0def 0ghi (0–7) (0–7) (0–7) Three small digits
a b c d e f 1 0 0 i 0abc 0def 100i (0–7) (0–7) Template:Uu Two small digits,
one large
a b c g h f 1 0 1 i 0abc 100f 0ghi (0–7) Template:Uu (0–7)
g h c d e f 1 1 0 i 100c 0def 0ghi Template:Uu (0–7) (0–7)
g h c 0 0 f 1 1 1 i 100c 100f 0ghi Template:Uu Template:Uu (0–7) One small digit,
two large
d e c 0 1 f 1 1 1 i 100c 0def 100i Template:Uu (0–7) Template:Uu
a b c 1 0 f 1 1 1 i 0abc 100f 100i (0–7) Template:Uu Template:Uu
x x c 1 1 f 1 1 1 i 100c 100f 100i Template:Uu Template:Uu Template:Uu Three large digits

Information

This is for transclusion in Densely packed decimal, Decimal32, Decimal64 and Decimal128. Only the table, above, will be included.

References

  1. Cowlishaw, M. F. (2000-10-03). "Summary of Densely Packed Decimal encoding". Retrieved 2008-09-10.