Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Binary-coded decimal
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Representational variations== Various BCD implementations exist that employ other representations for numbers. [[Programmable calculator]]s manufactured by [[Texas Instruments]], [[Hewlett-Packard]], and others typically employ a [[floating-point]] BCD format, typically with two or three digits for the (decimal) exponent. The extra bits of the sign digit may be used to indicate special numeric values, such as [[infinity]], [[arithmetic underflow|underflow]]/[[arithmetic overflow|overflow]], and [[Defined and undefined|error]] (a blinking display). ===Signed variations=== Signed decimal values may be represented in several ways. The [[COBOL]] programming language, for example, supports five zoned decimal formats, with each one encoding the numeric sign in a different way: {| class="wikitable" style="width:95%" |- ! style="background:#D0E0FF; width:25%"| Type ! style="background:#D0E0FF; width:55%"| Description ! style="background:#D0E0FF; width:20%"| Example |- | [[Signed number representations|Unsigned]] | No sign [[nibble]] | <code>F1 F2 <u>F</u>3</code> |- | Signed trailing ''(canonical format)'' | Sign nibble in the last (least significant) byte | <code>F1 F2 <u>C</u>3</code> |- | Signed leading ''(overpunch)'' | Sign nibble in the first (most significant) byte | <code><u>C</u>1 F2 F3</code> |- | Signed trailing separate | Separate sign character byte (<code>'+'</code> or <code>'β'</code>) following the digit bytes | <code>F1 F2 F3 <u>2B</u></code> |- | Signed leading separate | Separate sign character byte (<code>'+'</code> or <code>'β'</code>) preceding the digit bytes | <code><u>2B</u> F1 F2 F3</code> |} ==={{anchor|TBCD}}Telephony binary-coded decimal (TBCD)=== [[3GPP]] developed '''TBCD''',<ref name="3GPP_2013_TS29002"/> an expansion to BCD where the remaining (unused) bit combinations are used to add specific [[telephony]] symbols,<ref name="ETSI_SPS"/><ref name="OpenSS_XMAP"/> similar to those in [[DTMF|telephone keypad]] design. {| class="wikitable" style="width:30%; text-align:center" |- ! style="background:#E0E0E0; width:50%" |Decimal<br />digit ! style="background:#E0E0E0; width:50%" |TBCD<br />8 4 2 1 |- ! style="background:#F0F0F0" |* | 1 0 1 0 |- ! style="background:#F0F0F0" |# | 1 0 1 1 |- ! style="background:#F0F0F0" |a | 1 1 0 0 |- ! style="background:#F0F0F0" |b | 1 1 0 1 |- ! style="background:#F0F0F0" |c | 1 1 1 0 |- ! style="background:#F0F0F0" |Used as filler when there is an odd number of digits | 1 1 1 1 |} The mentioned 3GPP document defines '''TBCD-STRING''' with swapped nibbles in each byte. Bits, octets and digits indexed from 1, bits from the right, digits and octets from the left. <blockquote> bits 8765 of octet ''n'' encoding digit 2''n'' bits 4321 of octet ''n'' encoding digit 2(''n'' β 1) + 1 </blockquote> Meaning number <code>1234</code>, would become <code>21 43</code> in TBCD. This format is used in modern [[mobile telephony]] to send dialed numbers, as well as [[Mobile country code|operator ID]] (the MCC/MNC tuple), [[International Mobile Equipment Identity|IMEI]], [[International mobile subscriber identity|IMSI]] (SUPI), et.c.<ref>{{cite web|url=https://www.etsi.org/deliver/etsi_ts/124500_124599/124501/16.10.00_60/ts_124501v161000p.pdf|title=Non-Access-Stratum (NAS) protocol for 5G System (5GS); Stage 3. (3GPP TS 24.501 version 16.10.0 Release 16) TS 24.501 release 16.10.0|publisher=[[ETSI]] and [[3GPP]]|access-date=February 26, 2022|archive-date=February 17, 2022|archive-url=https://web.archive.org/web/20220217231615/https://www.etsi.org/deliver/etsi_ts/124500_124599/124501/16.10.00_60/ts_124501v161000p.pdf|url-status=live}} (TS 24.501)</ref><ref>{{cite web|url=https://www.etsi.org/deliver/etsi_ts/123000_123099/123003/16.08.00_60/ts_123003v160800p.pdf|title=Digital cellular telecommunications system (Phase 2+) (GSM); Universal Mobile Telecommunications System (UMTS); LTE; 5G; Numbering, addressing and identification (3GPP TS 23.003 version 16.8.0 Release 16)|publisher=[[ETSI]] and [[3GPP]]|access-date=February 26, 2022|archive-date=February 26, 2022|archive-url=https://web.archive.org/web/20220226144220/https://www.etsi.org/deliver/etsi_ts/123000_123099/123003/16.08.00_60/ts_123003v160800p.pdf|url-status=live}} (TS 23.003)</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)