Jump to content

Six-bit character code

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 198.160.103.148 (talk) at 16:09, 29 October 2015 (Promote Uuencode to its own section, add Base64 reference). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A six-bit character code is a character encoding designed for use on computers with word lengths a multiple of 6. Six bits can only encode 64 distinct characters, so these codes generally include only the upper-case letters, the numerals, some punctuation characters, and sometimes control characters. Such codes with additional parity bit were a natural way of storing data on 7-track magnetic tape.

Types of six-bit codes

The earliest computers dealt with numeric data only, and made no provision for character data. Six-bit BCD was used by IBM on early computers such as the IBM 704 in 1954.[1]: p.35  This encoding was replaced by the 8-bit EBCDIC code when System/360 standardized on 8-bit bytes. There are some variants of this type of code (see below).

Six-bit character codes generally succeeded the five-bit Baudot code and preceded seven-bit ASCII. One popular variant was DEC SIXBIT. This is simply the ASCII character codes from 32 to 95 coded as 0 to 63 by subtracting 32 (i.e., columns 2, 3, 4, and 5 of the ASCII table (16 characters to a column), shifted to columns 0 through 3, by subtracting 2 from the high bits); it includes the space, punctuation characters, numbers, and uppercase letters, but no control characters. Since it included no control characters, not even end-of-line, it was not used for general text processing. However, six-character names such as filenames and assembler symbols could be stored in a single 36-bit word of PDP-10, and two characters fit in each word of the PDP-1 and PDP-8.

Six-bit codes could encode more than 64 characters by the use of Shift Out and Shift In characters, essentially incorporating two distinct 62-character sets and switching between them. For example, the popular IBM 2741 communications terminal supported a variety of character sets of up to 88 printing characters plus control characters.

BCD six-bit code

Six-bit BCD code was the adaptation of the punched card code to binary code. IBM applied the terms binary-coded decimal and BCD to the variations of BCD alphamerics used in most early IBM computers, including the IBM 1620, IBM 1400 series, and non-Decimal Architecture members of the IBM 700/7000 series.

COBOL databases six-bit code

A six-bit code was also used in COBOL databases, where end-of-record information was stored separately.[citation needed]

Magnetic stripe card six-bit code

A six-bit code, with added odd parity bit, is used on Track 1 of magnetic stripe cards, as specified in ISO/IEC 7811-2.

DEC six-bit code

A DEC SIXBIT code including a few control characters — along with SO/SI, allowing code extension — was specified as ECMA-1 (see below). Another, less common, variant is obtained by just stripping the high bit of an ASCII code in 32 - 95 range (codes 32 - 63 remain at their positions, higher values have 64 subtracted from them). Such variant was sometimes used on DEC's PDP-8.

Fieldata six-bit code

Fieldata was a six-bit format used by UNIVAC's 1100-series computers. These systems used a 36-bit word (capable of storing 6 Fieldata characters).

Braille six-bit code

Braille characters are represented using six dot positions, arranged in a rectangle. Each position may contain a raised dot or not, so Braille can be considered to be a six-bit binary code.

Six-bit codes for binary-to-text encoding

Transmission of binary data over systems which are designed for text only can sometimes introduce problems. For example, email historically supported only 7-bit ASCII codes and would strip the 8th bit, thus corrupting binary data sent directly through any troublesome mail server. Other systems can cause issues by improperly interpreting control characters during storage or transmission. A number of schemes exist to pack 8-bit data into text-only representations, where it could easily pass through mail systems before being un-encoded at the endpoint. Examples of 6-bit character subsets used for packing binary data include Uuencode and Base64. These sets contain no control characters (only printable numbers, letters, some punctuation, and maybe space) and allow data to be transmitted over any medium which is also able to transmit human-readable text.

Examples of BCD six-bit codes

CDC 1604 : Magnetic tape BCD codes

.0 .1 .2 .3 .4 .5 .6 .7 .8 .9 .A .B .C .D .E .F
0. 1 2 3 4 5 6 7 8 9 0 # @ tape
mark
1. space / S T U V W X Y Z record
mark
, %
2. J K L M N O P Q R −0 $ *
3. & A B C D E F G H I +0 . ¤ group
mark

CDC 1604 : Punched card codes

.0 .1 .2 .3 .4 .5 .6 .7 .8 .9 .A .B .C .D .E .F
0. 1 2 3 4 5 6 7 8 9 0 =
1. space / S T U V W X Y Z , (
2. --- J K L M N O P Q R −0 $ *
3. + A B C D E F G H I +0 . )

CDC 1612 printer codes (business applications)

.0 .1 .2 .3 .4 .5 .6 .7 .8 .9 .A .B .C .D .E .F
0. : 1 2 3 4 5 6 7 8 9 0 = ! [
1. space / S T U V W X Y Z ] , ( ~
2. J K L M N O P Q R % $ * >
3. + A B C D E F G H I < . ) ? ;

Examples of six-bit ASCII variants

DEC SIXBIT:

.0 .1 .2 .3 .4 .5 .6 .7 .8 .9 .A .B .C .D .E .F
0. space ! " # $ % & ' ( ) * + , - . /
1. 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
2. @ A B C D E F G H I J K L M N O
3. P Q R S T U V W X Y Z [ \ ] ^ _

ECMA-1:

.0 .1 .2 .3 .4 .5 .6 .7 .8 .9 .A .B .C .D .E .F
0. space HT LF VT FF CR SO SI ( ) * + , - . /
1. 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
2. NULL A B C D E F G H I J K L M N O
3. P Q R S T U V W X Y Z [ \ ] ESC DEL
_0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _B _C _D _E _F
0_ Template:Chset-color-digit|0
00
0
Template:Chset-color-digit|1
01
1
Template:Chset-color-digit|2
02
2
Template:Chset-color-digit|3
03
3
Template:Chset-color-digit|4
04
4
Template:Chset-color-digit|5
05
5
Template:Chset-color-digit|6
06
6
Template:Chset-color-digit|7
07
7
Template:Chset-color-digit|8
10
8
Template:Chset-color-digit|9
11
9
Template:Chset-color-punct|+
12
10
Template:Chset-color-punct|-
13
11
Template:Chset-color-punct|/
14
12
Template:Chset-color-punct|,
15
13
Template:Chset-color-punct|.
16
14
Template:Chset-color-punct|SP
17
15
1_ Template:Chset-color-punct|
20
16
Template:Chset-color-punct|
21
17
Template:Chset-color-punct|(
22
18
Template:Chset-color-punct|)
23
19
Template:Chset-color-punct|×
24
20
Template:Chset-color-punct|=
25
21
Template:Chset-color-punct|;
26
22
Template:Chset-color-punct|[
27
23
Template:Chset-color-punct|]
30
24
Template:Chset-color-punct|*
31
25
Template:Chset-color-punct|
32
26
Template:Chset-color-punct|
33
27
Template:Chset-color-punct|
34
28
Template:Chset-color-punct|<
35
29
Template:Chset-color-punct|>
36
30
Template:Chset-color-punct|

37
31
2_ Template:Chset-color-intl|А
40
32
Template:Chset-color-intl|Б
41
33
Template:Chset-color-intl|В
42
34
Template:Chset-color-intl|Г
43
35
Template:Chset-color-intl|Д
44
36
Template:Chset-color-intl|Е
45
37
Template:Chset-color-intl|Ж
46
38
Template:Chset-color-intl|З
47
39
Template:Chset-color-intl|И
50
40
Template:Chset-color-intl|Й
51
41
Template:Chset-color-intl|К
52
42
Template:Chset-color-intl|Л
53
43
Template:Chset-color-intl|М
54
44
Template:Chset-color-intl|Н
55
45
Template:Chset-color-intl|О
56
46
Template:Chset-color-intl|П
57
47
3_ Template:Chset-color-intl|Р
60
48
Template:Chset-color-intl|С
61
49
Template:Chset-color-intl|Т
62
50
Template:Chset-color-intl|У
63
51
Template:Chset-color-intl|Ф
64
52
Template:Chset-color-intl|Х
65
53
Template:Chset-color-intl|Ц
66
54
Template:Chset-color-intl|Ч
67
55
Template:Chset-color-intl|Ш
70
56
Template:Chset-color-intl|Щ
71
57
Template:Chset-color-intl|Ы
72
58
Template:Chset-color-intl|Ь
73
59
Template:Chset-color-intl|Э
74
60
Template:Chset-color-intl|Ю
75
61
Template:Chset-color-intl|Я
76
62
Template:Chset-color-ctrl|DEL
77
63

Example of six-bit Braille codes

The following table shows the arrangement of characters, with the hex value, corresponding ASCII character, Braille 6-bit codes (dot combinations), Braille Unicode glyph, and general meaning (the actual meaning may change depending on context).[2][3]

Hex ASCII Glyph Braille Dots Braille Glyph Braille Meaning
20 (space) ⠀ (braille pattern blank) (space)
21 ! 2-3-4-6 ⠮ (braille pattern dots-2346) the
22 " 5 ⠐ (braille pattern dots-5) (contraction)
23 # 3-4-5-6 ⠼ (braille pattern dots-3456) (number prefix)
24 $ 1-2-4-6 ⠫ (braille pattern dots-1246) ed
25 % 1-4-6 ⠩ (braille pattern dots-146) sh
26 & 1-2-3-4-6 ⠯ (braille pattern dots-12346) and
27 ' 3 ⠄ (braille pattern dots-3) '
28 ( 1-2-3-5-6 ⠷ (braille pattern dots-12356) of
29 ) 2-3-4-5-6 ⠾ (braille pattern dots-23456) with
2A * 1-6 ⠡ (braille pattern dots-16) ch
2B + 3-4-6 ⠬ (braille pattern dots-346) ing
2C , 6 ⠠ (braille pattern dots-6) (uppercase prefix)
2D - 3-6 ⠤ (braille pattern dots-36) -
2E . 4-6 ⠨ (braille pattern dots-46) (italic prefix)
2F / 3-4 ⠌ (braille pattern dots-34) st
30 0 3-5-6 ⠴ (braille pattern dots-356) "
31 1 2 ⠂ (braille pattern dots-2) ,
32 2 2-3 ⠆ (braille pattern dots-23) ;
33 3 2-5 ⠒ (braille pattern dots-25) :
34 4 2-5-6 ⠲ (braille pattern dots-256) .
35 5 2-6 ⠢ (braille pattern dots-26) en
36 6 2-3-5 ⠖ (braille pattern dots-235) !
37 7 2-3-5-6 ⠶ (braille pattern dots-2356) ( or )
38 8 2-3-6 ⠦ (braille pattern dots-236) " or ?
39 9 3-5 ⠔ (braille pattern dots-35) in
3A : 1-5-6 ⠱ (braille pattern dots-156) wh
3B ; 5-6 ⠰ (braille pattern dots-56) (letter prefix)
3C < 1-2-6 ⠣ (braille pattern dots-126) gh
3D = 1-2-3-4-5-6 ⠿ (braille pattern dots-123456) for
3E > 3-4-5 ⠜ (braille pattern dots-345) ar
3F ? 1-4-5-6 ⠹ (braille pattern dots-1456) th
 
Hex ASCII Glyph Braille Dots Braille Glyph Braille Meaning
40 @ 4 ⠈ (braille pattern dots-4) (accent prefix)
41 A 1 ⠁ (braille pattern dots-1) a
42 B 1-2 ⠃ (braille pattern dots-12) b
43 C 1-4 ⠉ (braille pattern dots-14) c
44 D 1-4-5 ⠙ (braille pattern dots-145) d
45 E 1-5 ⠑ (braille pattern dots-15) e
46 F 1-2-4 ⠋ (braille pattern dots-124) f
47 G 1-2-4-5 ⠛ (braille pattern dots-1245) g
48 H 1-2-5 ⠓ (braille pattern dots-125) h
49 I 2-4 ⠊ (braille pattern dots-24) i
4A J 2-4-5 ⠚ (braille pattern dots-245) j
4B K 1-3 ⠅ (braille pattern dots-13) k
4C L 1-2-3 ⠇ (braille pattern dots-123) l
4D M 1-3-4 ⠍ (braille pattern dots-134) m
4E N 1-3-4-5 ⠝ (braille pattern dots-1345) n
4F O 1-3-5 ⠕ (braille pattern dots-135) o
50 P 1-2-3-4 ⠏ (braille pattern dots-1234) p
51 Q 1-2-3-4-5 ⠟ (braille pattern dots-12345) q
52 R 1-2-3-5 ⠗ (braille pattern dots-1235) r
53 S 2-3-4 ⠎ (braille pattern dots-234) s
54 T 2-3-4-5 ⠞ (braille pattern dots-2345) t
55 U 1-3-6 ⠥ (braille pattern dots-136) u
56 V 1-2-3-6 ⠧ (braille pattern dots-1236) v
57 W 2-4-5-6 ⠺ (braille pattern dots-2456) w
58 X 1-3-4-6 ⠭ (braille pattern dots-1346) x
59 Y 1-3-4-5-6 ⠽ (braille pattern dots-13456) y
5A Z 1-3-5-6 ⠵ (braille pattern dots-1356) z
5B [ 2-4-6 ⠪ (braille pattern dots-246) ow
5C \ 1-2-5-6 ⠳ (braille pattern dots-1256) ou
5D ] 1-2-4-5-6 ⠻ (braille pattern dots-12456) er
5E ^ 4-5 ⠘ (braille pattern dots-45) (contraction)
5F _ 4-5-6 ⠸ (braille pattern dots-456) (contraction)

See also

References

  1. ^ IBM Corporation (1954). 704 electronic data-processing machine: manual of operation (PDF).
  2. ^ "Representing and Displaying Braille". DotlessBraille.org. 2002-02-20. Retrieved 2009-08-09.
  3. ^ Halleck, John (2000-08-24). "braille-ascii.ads". Braille.Ascii. Retrieved 2009-08-10.