Rabu, 30 Maret 2011

PENGKODEAN


Kode ASCII, BCD, BCDIC, EBCDIC, BAUDOT

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.
display and so are not used as shown below.
Decimal Binary Pattern BCD
8 4 2 1
0 0 0 0 0 0
1 0 0 0 1 1
2 0 0 1 0 2
3 0 0 1 1 3
4 0 1 0 0 4
5 0 1 0 1 5
6 0 1 1 0 6
7 0 1 1 1 7
Decimal Binary Pattern BCD
8 4 2 1
8 1 0 0 0 8
9 1 0 0 1 9
10 1 0 1 0 Invalid
11 1 0 1 1 Invalid
12 1 1 0 0 Invalid
13 1 1 0 1 Invalid
14 1 1 1 0 Invalid
15 1 1 1 1 Invalid


BCD to 7-Segment Display Decoders

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
1 0 0 0 1 1
2 0 0 1 0 2
3 0 0 1 1 3
4 0 1 0 0 4
5 0 1 0 1 5
6 0 1 1 0 6
7 0 1 1 1 7
Decimal Binary Pattern BCD
8 4 2 1
8 1 0 0 0 8
9 1 0 0 1 9
10 1 0 1 0 Invalid
11 1 0 1 1 Invalid
12 1 1 0 0 Invalid
13 1 1 0 1 Invalid
14 1 1 1 0 Invalid
15 1 1 1 1 Invalid


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

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

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

perkalian 2 buah matrik

ALGORITMA PERKALIAN 2 BUAH MATRIK DENGAN ORDO 25*25

Kamus
Type
Larik=array [1…25, 1…25] of real
Var
G, H, I,: Byte
D, E, F: Larik
J, K, L : Byte
Algoritma :
{
Read (J, K, L)
Writeln (‘Matrik 1’)
For G←1 to J Do
{
For H←1 to K Do
{
Readln(D[J, K])
}
}
Writlen (‘Matrik 2’)
For G←1 to K Do
{
For H←1 to L Do
{
Readln(E[J, K])
}
}
Writeln (‘ Perkalian Matrik’)
For G←1 to J Do
{
For H←1 to K Do
{
F[J, K])←0
For I←1 To F Do
F[J, K])← F[J, K])+ (D[J, K])* (E[J, K])
}
}
Writeln (‘Mencetak Hasil Perkalian’)
For G←1 to J Do
{
For H←1 to L Do
Writeln (C[J, K]:10:2)
}
Writeln
}
Langkah Input Data D
G←1, H←1 D[1,1]←1
G←1, H←2 D[1,2]←2
G←2, H←1 D[2,1]←1
G←2, H←2 D[2,2]←3
Langkah Input Data E
G←1, H←1 E[1,1]←2
G←1, H←2 E[1,2]←1
G←2, H←1 E[2,1]←1
G←2, H←2 E[2,2]←2
Langkah Perkalian
G←1, H←1, I←1
F[1,1]←0 +D[1,2]*B[1,1]
F←0+1*2
F←2
G←1, H←1, I←2
F[1,1]←2+D[1,2]*B[2,1]
F←2+1*2
F←4



Kasus 2
Matriks dengan Ordo 10*50
kamus
Type

tabel=Array [1...10, 1...50]of byte
a,b : byte
Var
Z tabel
a,b

Algoritma;
For a ←1 to 10 Do
{
For b←1 to 50 Do
Readl n(table[a, b])
}
For a ←1 to 10 Do
{
For b←1 to 50 Do
Writeln(table[a, b])

penjumlahan 2 buah metrik

ALGORITMA PENJUMLAHAN 2 BUAH MATRIKS
#include
#include

//LATIHAN ARRAY
void main() {

//KAMUS DATA
int matrikA[3][3];
int matrikB[3][3];
int matrikC[3][3];
int i,j;

//ISI PROGRAM

for (i=0;i<3;i++) { for (j=0;j<3;j++) { printf ("matrik A %d,%d : ",i+1,j+1); scanf("%d",&matrikA[i][j]); } } for (i=0;i<3;i++) { for (j=0;j<3;j++) { printf ("%6d",matrikA[i][j]); } printf("\n"); } for (i=0;i<3;i++) { for (j=0;j<3;j++) { printf ("matrik B %d,%d : ",i+1,j+1); scanf("%d",&matrikB[i][j]); } } for (i=0;i<3;i++) { for (j=0;j<3;j++) { printf ("%6d",matrikB[i][j]); } printf("\n"); } printf("matriks C :\n\n"); for(i=0;i<3;i++){ for(j=0;j<3;j++){ matrikC[i][j]=matrikA[i][j]+matrikB[i][j]; printf("%6d",matrikC[i][j]); } printf("\n"); } getche(); } pengertian matrik. matrik adalah bilangan-bilangan yang tersusun dalam bentuk persegi panjang. langkah-langkah / algoritma pembuatan matiks. > buat 2 variabel array untuk menampung inputan matrik.
yang pertama array 2 dimensi untuk inputan matrik
yang ke-dua array dimensi 1 untuk menampung hasil matriknya.
co :
var matrik : array [1..2,1..4];
hasil : array [1..4];

> buat looping pertama untuk banyaknya matrik yang ingin di jumlahkan/ di kurangkan,
> looping ke dua ke dua untuk menampung bilangan-bilangan matrik (buat looping ke 2 di dalam looping pertama)
co :
for a := 1 to 2 do
begin
for b := 1 to 4 do

> buat looping untuk proses penjumlahan / pengurangan menggunakan array dimensi 1.
co :
for c:= 1 to 4 do
hasil[c] := matrik[1,c] + matrik [2,c];

> buat looping untuk output dari hasil matrik dengan menggunakan array dimensi 1
for [d] := 1 to 4 do
writeln (hasil[d]);

Selasa, 22 Maret 2011

komunikasi data dan array

KOMUNIKASI DATA
A. Komunikasi Data
Istilah telekomunikasi berarti komunikasi dengan jarak. Kata data mengacu pada informasi yang ditampilkan apapun bentuk yang disetujui oleh pihak yg membuat dan menggunakan. Komunikasi data adalah pertukaran data diantara dua perangkat melalui berbagi bentuk media transmisi seperti kabel.
Topik yg didiskusikan pada bab ini:
1. Komponen
2. Representasi Data
3. Aliran Data
B. Jaringan
Sebuah jaringan adalah kumpulan perangkat (sering disebut sebagai nodes) yg dihubungkan oleh jalur komunikasi. Sebuah node dapat berupa komputer, printer, atau perangkat apapun yg mampu mengirim dan atau menerima data yang dibuat oleh node lainnya pada jaringan.
Topik yg didiskusikan pada bab ini:
1. Proses terdistribusi
2. Kriteria Jaringan
3. Struktur Fisik
4. Model Jaringan
5. Jenis – jenis Jaringan
6. Interkoneksi pada Jaringan : Internetwork





C. Internet
Internet telah merevolusi berbagai aspek dlm hidup kita. Internet adalah sebuah sistem komunikasi yang membawa informasi ke ujung jari kita dan diorganisasikan untuk kita gunakan.
Topik yg didiskusikan pada bab ini:
1. Sejarah singkat
2. Internet Hari ini
D. Protocol dan Standard
Pada bagian ini, kita akan menjelaskan dua hal yang banyak digunakan : protocol dan standard. Pertama, kita jelaskan protocol, dimana sinonim dengan aturan. Kemudian kita diskusikan standard, dimana sinonim dengan aturan yang disepakati.
Topik yg didiskusikan pada bab ini:
1. Protocol
2. Standard
3. Orgranisasi Standards
4. Standar Internet
MODEL JARINGAN
A. Tugas terlapis
Kita menggunakan konsep lapisan pada kehidupan kita sehari2. Sebagai contoh, mari kita lihat dua orang teman yang berkomunikasi melalui surat pos. Proses untuk mengirimkan surat ke teman akan menjadi komplek jika tidak ada layanan yg tersedia dari kantor pos.




Topik yg didiskusikan di bagian ini:
1.Pengirim, penerima dan pembawa Hirarki
B. Osi Model
Berdiri pada thn 1947, the International Standards Organization (ISO) adalah badan multinational yg mengkhususkan pada persetujuan seluruh dunia pada standar internasional. Sebuah standar ISO yg membahas semua aspek pada jaringan data adalah Open Systems Interconnection (OSI) model. Model ini pertama kali dikenalkan pada akhir 1970.
Topik yg didiskusikan di bagian ini:
1. ArsitekturBerlapis
2. Proses Peer-to-Peer
3. Encapsulation
C. Lapisan pada OSI Model
Pada bagian ini kita akan menjelaskan secara singkat fungsi setiap layer pada OSI model.
Topik yg didiskusikan di bagian ini:
1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer





ARRAY

From Wikipedia, the free encyclopedia
Jump to: navigation, search
An array is a systematic arrangement of objects, usually in rows and columns. Specifically, it may refer to:
Contents
[hide]
• 1 In computer science
• 2 In mathematics and statistics
• 3 In technology
• 4 In astronomy
• 5 In biology
• 6 In music
• 7 Other

[edit] In computer science
Generally, a collection of data items that can be selected by indices computed at run-time, including:
• Array data structure, an arrangement of items at equally spaced addresses in computer memory
• Array data type, used in a programming language to specify a variable that can be indexed
• Associative array, an abstract data structure model that generalizes arrays to arbitrary indices
or various kinds of the above, such as
• Bit array or bit vector
• Dynamic array, allocated at run time
• Parallel array of records, with each field stored as a separate array
• Sparse array, with most elements omitted, to store a sparse matrix
• Variable-length array
• Jagged array, where the rows have different lengths individually



or various related concepts:
• Array processor, a computer to process arrays of data (not to be confused with a processor array)
• Array programming, using matrix algebra notation in programs (not the same as array processing)
• Array slicing, the extraction of sub-arrays of an array
or also:
• Global Arrays, a library for parallel processing
• Intel Array Visualizer, a piece of scientific graphics software
[edit] In mathematics and statistics
• An array or matrix (mathematics) e.g. a Monge array, a Costas array
• A standard array in coding theory
• In statistics, arrays are a name for some kinds of Category:Experimental design
• Intersection array a concept of category theory
• The thinned array curse or sparse array curse, a theorem about elecromagnetic waves
[edit] In technology
Various arrangements of multiple individual components to create a single system, such as:
• An antenna array, such as a phased array, a tower array, etc.
• A speaker array, used to produce directional Sound
• Asynchronous array of simple processors
• Ball grid array, pin grid array, and land grid array, ways to connect integrated circuits
• Cache Array Routing Protocol (CARP)
• Color filter array, placed over an imaging array
• Disk array, such as the RAID
• Field emitter array, an electron source
• Gate array, including a field-programmable gate array (FPGA)
• Halbach array, an arrangement of magnets
• Linear diode array used in image scanners
• Microphone array, such as a line array
• Microelectronic array for biological monitoring
• Parametric array of transducers
• Phased-array optics
• Photovoltaic array
• Processor array (not to be confused with an array processor)
• Programmable Array Logic (PAL), a systematic way to implement boolean functions.
• Reconfigurable datapath array, a flexible data processing architecture
• Staring array, an imaging sensor
• Systolic array, a hardware architecture
• Towed array sonar
• Wi-Fi array, a wireless networking device
• Video Graphics Array (VGA), a display adapter and video format, and many variants thereof (EVGA, FWVGA, QVGA, QXGA, SVGA, SXGA, SXGA+, TXGA, UVGA, XGA, XGA+, ...)
• ICL Distributed Array Processor, an array processor for the ICL
and also
• Array gain, a telecommunications parameter
• Array processing of multichannel signals (not to be confused with array programming)

copas http://nindymonica.blogspot.com/

0 komentar:

Poskan Komentar