Rabu, 30 Maret 2011

PeNgKoDean KomUnIkAsi DaTa

ASCII Kode
Kode Standar Amerika untuk Pertukaran Informasi atau ASCII (American Standard Code for Information Interchange) merupakan suatu standar internasional dalam kode huruf dan simbol seperti Hex dan Unicode tetapi ASCII lebih bersifat universal, contohnya 124 adalah untuk karakter "|". Ia selalu digunakan oleh komputer dan alat komunikasi lain untuk menunjukkan teks. Kode ASCII sebenarnya memiliki komposisi bilangan biner sebanyak 8 bit. Dimulai dari 0000 0000 hingga 1111 1111. Total kombinasi yang dihasilkan sebanyak 256, dimulai dari kode 0 hingga 255 dalam sistem bilangan Desimal.
BCD Kode
Binary Coded Decimal (BCD or "8421" BCD) numbers are made up using just 4 data bits (a nibble or half a byte) similar to the Hexadecimal numbers we saw in the binary tutorial, but unlike hexadecimal numbers that range in full from 0 through to F, BCD numbers only range from 0 to 9, with the binary number patterns of 1010 through to 1111 (A to F) being invalid inputs for this type of display and so are not used as shown below.
Decimal Binary Pattern BCD
8 4 2 1
0 0 0 0 0 0
100011
200102
300113
401004
501015
601106
701117
 
Decimal Binary Pattern BCD
8 4 2 1
8 1 0 0 0 8
910019
101010Invalid
111011Invalid
121100Invalid
131101Invalid
141110Invalid
151111Invalid

BCD to 7-Segment Display Decoders

A binary coded decimal (BCD) to 7-segment display decoder such as the TTL 74LS47 or 74LS48, have 4 BCD inputs and 7 output lines, one for each LED segment. This allows a smaller 4-bit binary number (half a byte) to be used to display all the denary numbers from 0 to 9 and by adding two displays together, a full range of numbers from 00 to 99 can be displayed with just a single byte of 8 data bits.

BCD to 7-Segment Decoder

BCD to 7-segment Decoder
The use of packed BCD allows two BCD digits to be stored within a single byte (8-bits) of data, allowing a single data byte to hold a BCD number in the range of 00 to 99.
An example of the 4-bit BCD input (0100) representing the number 4 is given below.

Example No1

BCD Decoder Circuit
In practice current limiting resistors of about 150Ω to 220Ω would be connected in series between the decoder/driver chip and each LED display segment to limit the maximum current flow. Different display decoders or drivers are available for the different types of display available, e.g. 74LS48 for common-cathode LED types, 74LS47 for common-anode LED types, or the CMOS CD4543 for liquid crystal display (LCD) types.
Liquid crystal displays (LCD´s) have one major advantage over similar LED types in that they consume much less power and nowadays, both LCD and LED displays are combined together to form larger Dot-Matrix Alphanumeric type displays which can show letters and characters as well as numbers in standard Red or Tri-colour outputs.

BCDIC Kode

EBCDIC Kode  
ASCII is not the only format in use out there. IBM adopted EBCDIC (Extended Binary Coded Decimal Interchange Code) developed for punched cards in the early 1960s and still uses it on mainframes today. It is probably the next most well known character set due to the proliferation of IBM mainframes. It comes in at least six slightly differing forms, so again here is the most common. 


BAUDOT Kode
This table presents a programmer's quick reference to the "Baudot" character set.
IMPORTANT NOTE: The code presented here is with reference to usage in the computer industry. The original, true, baudot code differs from that presented below. The following table presents CCITT Alphabet No 2 which was developed from Murray's code which was in turn developed from Baudot's code. Baudot's code was replaced by Murray's code in 1901. And ITA2 replaced both by the early 1930's, so virtually all "teletype" equipment made in the U.S. uses ITA2 or the U.S. national version of the code.
The 'baudot' code has been used extensively in telegraph systems. It is a five bit code invented by the Frenchman Emile Baudot in 1870. Using five bits allowed 32 different characters. To accomodate all the letters of the alphabet and numerals, two of the 32 combinations were used to select alternate character sets. The figures column is valid after a figures shift character has been received. It remains in effect until a letters shift is received, after which the letters column should be referred to (and vice-versa).
Two 'Baudot codes' are in common useage. The first as used in America. The second, used in Europe, is also termed the CCITT Alphabet No. 2. In each, the 'letters' are identical, but the 'figures' differ.
The five-bit words are bracketed by a start bit (space) and a stop bit (mark). Idling is shown by the 'marking' state. Words are transmitted LSB first.
Binary
Decimal
Hex
Octal
Letter
U.S.
Figures
CCITT No.2
Figures
00000
0
0
0
N/A
N/A
N/A
00001
1
1
1
E
3
3
00010
2
2
2
LF
LF
LF
00011
3
3
3
A
-
-
00100
4
4
4
Space
Space
Space
00101
5
5
5
S
BELL
'
00110
6
6
6
I
8
8
00111
7
7
7
U
7
7
01000
8
8
10
CR
CR
CR
01001
9
9
11
D
$
WRU
01010
10
A
12
R
4
4
01011
11
B
13
J
'
Bell
01100
12
C
14
N
,
,
01101
13
D
15
F
!
!
01110
14
E
16
C
:
:
01111
15
F
17
K
(
(
10000
16
10
20
T
5
5
10001
17
11
21
Z
"
+
10010
18
12
22
L
)
)
10011
19
13
23
W
2
2
10100
20
14
24
H
#
£
10101
21
15
25
Y
6
6
10110
22
16
26
P
0
0
10111
23
17
27
Q
1
1
11000
24
18
30
O
9
9
11001
25
19
31
B
?
?
11010
26
1A
32
G
&
&
11011
27
1B
33
Figures Shift
Figures Shift
Figures Shift
11100
28
1C
34
M
.
.
11101
29
1D
35
X
/
/
11110
30
1E
36
V
;
=
11111
31
1F
37
Letters Shift
Letters Shift
Letters Shift

Tidak ada komentar:

Posting Komentar