0% found this document useful (0 votes)
44 views7 pages

Tugas Mata Sistem Linier " Resum Konvolusi Sinyal": Oleh: 1. ACHMAD YANI (140431100050)

This 3 sentence summary provides the key details about the document: The document is a report in Indonesian by Achmad Yani discussing signal convolution summarization. It includes source code for a program that converts numbers between decimal, binary, octal and hexadecimal systems. The program also separates integer values into thousands, hundreds, tens and ones place values.

Uploaded by

Achmad Yani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views7 pages

Tugas Mata Sistem Linier " Resum Konvolusi Sinyal": Oleh: 1. ACHMAD YANI (140431100050)

This 3 sentence summary provides the key details about the document: The document is a report in Indonesian by Achmad Yani discussing signal convolution summarization. It includes source code for a program that converts numbers between decimal, binary, octal and hexadecimal systems. The program also separates integer values into thousands, hundreds, tens and ones place values.

Uploaded by

Achmad Yani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

TUGAS

MATA SISTEM LINIER


“ Resum Konvolusi Sinyal”

OLEH:
1. ACHMAD YANI (140431100050)

PROGRAM STUDI S1 TEKNIK ELEKTRO


FAKULTAS TEKNIK
UNIVERSITAS TRUNOJOYO MADURA
2017
1. Konversi Bilangan (decimal-biner, decimal-octal, decimal-hexadesimal)
2. Program sistem bilangan dengan orde ribuan
Source kode program

// program konversi bilangan


procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if not ( key in['0'..'9', #8, #13]) then
begin
//key:= #0 ;
Edit1.Text := 'DATA ERROR';
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
desimal,des,sisa : integer;
sb : Integer;
hexa : string;
bin : String;
oct: string;
begin
if(desimal>255)then Edit1.Text := 'DATA ERROR';
if (Edit1.Text = 'DATA ERROR') then
begin
MessageDlg('Input Tidak Valid.!!',mtError, [mbOK],0);
exit;
end;
desimal:= strtoint(edit1.Text);
case radiogroup1.ItemIndex of
0 : begin
Edit5.Text:= IntToBin(StrToInt(Edit1.Text));
end;
1 : begin
oct := '';
while desimal <> 0 do
begin
sb :=(desimal mod 8);
desimal:= desimal div 8;
oct := IntToStr(sb)+ oct;
Edit5.Text:= oct;
end;
end;
2 : begin
Repeat
sb :=(desimal mod 16);
hexa := IntToStr(sb);
if hexa = '10' then hexa := 'A'
else if hexa = '11' then hexa := 'B'
else if hexa = '12' then hexa := 'C'
else if hexa = '13' then hexa := 'D'
else if hexa = '14' then hexa := 'E'
else if hexa = '15' then hexa := 'F';
oct := hexa + oct;
Edit5.Text:= oct;
desimal:= desimal div 16;
Until desimal <= 0;
end;
end;
end;

function TForm1.IntToBin(Value: Byte): string;


var
i: Integer;
begin
SetLength(Result, 8);
for i := 1 to 8 do begin
if (Value shr (8-i)) and 1 = 0 then begin
Result[i] := '0'
end else begin
Result[i] := '1';
end;
end;
end;

procedure TForm1.CloseClick(Sender: TObject);


begin
//halt;
if(application.MessageBox('Apakah anda setuju ?','Konfirmasi',MB_YesNo)=ID_yes)
then
begin
halt;
//showmessage('Ini adalah Pesan Bahwa anda setuju');
end
else
begin
showmessage('Silakan Masukan angka kembali');
end;
end;

procedure TForm1.Edit1Change(Sender: TObject);


var key : char;
begin
Edit1.MaxLength:=3;
//MessageDlg('Masukan Angka dengan Maksimal Bilangan 8 Bit/
255',mtWarning,[mbok],0);
end;

procedure TForm1.Edit2Change(Sender: TObject);


begin
Edit2.MaxLength:=4;
end;

procedure TForm1.Edit3Change(Sender: TObject);


begin
Edit3.MaxLength:=4;
end;

procedure TForm1.Button3Click(Sender: TObject);


begin
Edit1.Clear;
Edit2.Clear;
end;

// program sistem bilangan dengan orde ribuan


procedure TForm1.Button2Click(Sender: TObject);
var input,rib,rib1,rat,rat1,pul,sat:integer;
begin
input:=strtoint(Edit2.Text);
rib :=input div 1000;
rib1:= input mod 1000;
rat := rib1 div 100;
rat1:= rib1 mod 100;
pul := rat1 div 10;
sat := rat1 mod 10;
edit3.Text := inttostr(rib);
edit4.Text := inttostr(rat);
edit6.Text := inttostr(pul);
edit7.Text := inttostr(sat);
end;
end.
Hasil Uji Coba

Gambar Tampilan Awal Gambar konversi bilang


Gambar program pembagi satuan

You might also like