Skip to main content
Binary to decimal and Hexa Decimal converter
            This application is used to change binary 8 bit data in to other forms that are decimal and hexadecimal. This application is used to make numeral binary conversion easier to be written in the Port Parallel that is impossible to write data in bit type format, the data that can be written to Port Parallel is Byte, Word, and DWord data.
To make binary numeral Converter Application to decimal and hexadecimal, enter the following component in the table to Form 1:

Table, the list of the Binary numeral Application Converter to the decimal and hexadecimal
No Component Properti Value
Form1 Caption BINER TO DEC AND HEXA
GroupBox1 Caption BINER
GroupBox1 Caption Hexa + Decimal
Label1 Caption D0
Label2 Caption D1
Label3 Caption D2
Label4 Caption D3
Label5 Caption D4
Label6 Caption D5
Label7 Caption D6
Label8 Caption D7
Label9 Caption Hexa
Label10 Caption Decimal
Edit1 Text 1
Edit2 Text 1
Edit3 Text 1
Edit4 Text 1
Edit5 Text 1
Edit6 Text 1
Edit7 Text 1
Edit8 Text 1
Edit9 Text Kosongkan
Edit10 Text Kosongkan
Button1 Caption Low
Button2 Caption Low
Button3 Caption Low
Button4 Caption Low
Button5 Caption Low
Button6 Caption Low
Button7 Caption Low
Button8 Caption Low
Button9 Caption CONVERT HEXA
Button10 Caption CONVERT DEC

After that arrange the visualization become:



Picture. Binary Converter Application Visualization Design to decimal and hexadecimal. 

After finishing arrange it, declare a global variable with value name integer type as the following picture below:

Picture; Global Variable declaration.
Type Source Code properly with the following table below:


Table. Binary numeral converter application visualization design to decimal and hexadecimal source code.


Component Event Source Code
Button1 OnClick value:=strtoint(edit1.Text);
if    value = 1 then
begin
value:=0;
button1.Caption:='High';
edit1.Text:=inttostr(value);
end
else
if value = 0 then
begin
value:=1;
edit1.Text:=inttostr(value);
button1.Caption:='Low';
end;
Button2 OnClick value:=strtoint(edit2.Text);
if    value = 1 then
begin
value:=0;
button2.Caption:='High';
edit2.Text:=inttostr(value);
end
else
if value = 0 then
begin
value:=1;
edit2.Text:=inttostr(value);
button2.Caption:='Low';
end;
Button3 OnClick value:=strtoint(edit3.Text);
if    value = 1 then
begin
value:=0;
button3.Caption:='High';
edit3.Text:=inttostr(value);
end
else
if value = 0 then
begin
value:=1;
edit3.Text:=inttostr(value);
button3.Caption:='Low';
end;
Button4 OnClick value:=strtoint(edit4.Text);
if    value = 1 then
begin
value:=0;
button4.Caption:='High';
edit4.Text:=inttostr(value);
end
else
if value = 0 then
begin
value:=1;
edit4.Text:=inttostr(value);
button4.Caption:='Low';
end;
Button5 OnClick value:=strtoint(edit5.Text);
if    value = 1 then
begin
value:=0;
button5.Caption:='High';
edit5.Text:=inttostr(value);
end
else
if value = 0 then
begin
value:=1;
edit5.Text:=inttostr(value);
button5.Caption:='Low';
end;
Button6 OnClick value:=strtoint(edit6.Text);
if    value = 1 then
begin
value:=0;
button6.Caption:='High';
edit6.Text:=inttostr(value);
end
else
if value = 0 then
begin
value:=1;
edit6.Text:=inttostr(value);
button6.Caption:='Low';
end;
Button7 OnClick value:=strtoint(edit7.Text);
if    value = 1 then
begin
value:=0;
button7.Caption:='High';
edit7.Text:=inttostr(value);
end
else
if value = 0 then
begin
value:=1;
edit7.Text:=inttostr(value);
button7.Caption:='Low';
end;
Button8 OnClick value:=strtoint(edit8.Text);
if    value = 1 then
begin
value:=0;
button8.Caption:='High';
edit8.Text:=inttostr(value);
end
else
if value = 0 then
begin
value:=1;
edit8.Text:=inttostr(value);
button8.Caption:='Low';
end;
Button9 OnClick var bit1,bit2,bit3,bit4,bit5,bit6,bit7,bit8,dec1,dec2,dec3,
dec4,dec5,dec6,dec7,dec8,dec_tot:integer;
begin
bit1:= strtoint(Edit1.text);
if bit1=0 then dec1:=0 else  dec1:=1;
bit2:= strtoint(Edit2.text);
if bit2=0 then dec2:=0 else dec2:=2;
bit3:= strtoint(Edit3.text);
if bit3=0 then dec3:=0 else   dec3:=4;
bit4:= strtoint(Edit4.text);
if bit4=0 then dec4:=0 else   dec4:=8;
bit5:= strtoint(Edit5.text);
if bit5=0 then dec5:=0 else   dec5:=16;
bit6:= strtoint(Edit6.text);
if bit6=0 then dec6:=0 else   dec6:=32;
bit7:= strtoint(Edit7.text);
if bit7=0 then dec7:=0 else   dec7:=64;
bit8:= strtoint(Edit8.text);
if bit8=0 then dec8:=0 else   dec8:=128;
dec_tot:=dec1+dec2+dec3+dec4+dec5+dec6+dec7+dec8;
edit10.Text:=inttostr(dec_tot);
Button10 OnClick var str1,str2,hexa : string;
begin
str1 :=Edit4.Text + Edit3.Text + Edit2.Text + Edit1.Text;
   if (str1 = '0000')then hexa :='0';
if (str1 = '0001')then hexa :='1';
if (str1 = '0010')then hexa :='2';
if (str1 = '0011')then hexa :='3';
if (str1 = '0100')then hexa :='4';
if (str1 = '0101')then hexa :='5';
if (str1 = '0110')then hexa :='6';
if (str1 = '0111')then hexa :='7';
if (str1 = '1000')then hexa :='8';
if (str1 = '1001')then hexa :='9';
if (str1 = '1010')then hexa :='A';
if (str1 = '1011')then hexa :='B';
if (str1 = '1100')then hexa :='C';
if (str1 = '1101')then hexa :='D';
if (str1 = '1110')then hexa :='E';
if (str1 = '1111')then hexa :='F';
str2 := Edit8.Text + Edit7.Text + Edit6.Text +  Edit5.Text ;
if (str2 = '0000')then hexa :='0'+hexa;
if (str2 = '0001')then hexa :='1'+hexa;
if (str2 = '0010')then hexa :='2'+hexa;
if (str2 = '0011')then hexa :='3'+hexa;
if (str2 = '0100')then hexa :='4'+hexa;
if (str2 = '0101')then hexa :='5'+hexa;
if (str2 = '0110')then hexa :='6'+hexa;
if (str2 = '0111')then hexa :='7'+hexa;
if (str2 = '1000')then hexa :='8'+hexa;
if (str2 = '1001')then hexa :='9'+hexa;
if (str2 = '1010')then hexa :='A'+hexa;
if (str2 = '1011')then hexa :='B'+hexa;
if (str2 = '1100')then hexa :='C'+hexa;
if (str2 = '1101')then hexa :='D'+hexa;
if (str2 = '1110')then hexa :='E'+hexa;
if (str2 = '1111')then hexa :='F'+hexa;
Edit9.text :=hexa;
end;



After that run, the following is the testing visualization of binary to hexa decimal and decimal Converter Application visualization design to decimal and hexadecimal that is made:




  I hope this article can give benefit to the visitors, readers, developer and me. Thanks for visiting and availability for sharing this article by pressing 
Share this on Facebook
or just press like button under this posting

Popular posts from this blog

Login Form Delphi by Connecting to Ms Access Database.

this the step by step  to making application :

Login Form Delphi by Connecting Ms Access Database.

In making/ building application in Delphi, login Form is an important to protect application so that cannot be open by irresponsible person. This login Form is connected with database so that able to keep a lot of username data and password. Before make the application, please create a database as the picture below:
Picture :Login  form Delphi database Microsoft Access
Save the database in the folder which use to save the application


Next step is create the application

Enter the component and the source code as follows.


No Component NameProperties Value1Label1CaptionUsername2Label2CaptionPassword3Edit1Text -4Edit2Text -5Button1CaptionLogin6Adoconnection1--7AdoQuery1ConnectionADOConnection1

Arrange the component as the picture below:


Figure. Login Form Delphi design form



 Create new form



Form properties can be check in the table below
No Component NameProperties Value1Form1CaptionSuccess…

Step by step Accessing SMS With Delphi: Sending SMS Using Borland Delphi 7 Exploit Comport Component (Siemens))

In this example, will present the way how making SMS delivery program with Delphi, basically, data in data communication series between Delphi and mobile phone happen in Format Protocol Data Unit (PDU). The destination number of sending Message and message that will be sent through Delphi program that is made have to be changed into PDU Form first, next is the data will be sent through serial port to mobile phone. To make the send SMS Application , please enter the following component to Form 1.

No Component NameProperties ValueButton1CaptionConnectButton2CaptionDisConnectButton3CaptionConvert to PDUButton4CaptionSend to HPButton5CaptionClearButton6CaptionStart Send SMSButton7CaptionSet PortEdit1Text-Edit2Text<Type The SMS here>Edit3Text-Label1Caption1) Destination Number :Label2Caption2Label3CaptionPDU lengthLabel4CaptionLabel lengthComLed1--Memo1--Memo2--Comport1--Arrange the Component  in such away so that the visualization program is as follows:


Then type the follow…

The Example Using Chart In Borland Delphi 7

The Example Using Chart In Borland Delphi 7




In this writing will discuss about how to use the chart in Delphi 7. In the example that is made by using Delphi 7, chart will appear 2 data in the form of incremental data number, the first data named data 1 and the second data named data 2. Data 1 is incremental data 1 that is begun from 0 until 10; while data 2 is same. Yet, in the beginning condition of data 1 start from 0 while data 2 start from 1.


To make application as the explanation above, please enter the components in the table below into design form.


NoComponentPropertiesValueNote1Form1CaptionThe Chart of Data on Delphi 72GroupBox1CaptionThe Chart of Data on Delphi 73Label1CaptionData 14Label2CaptionData 25Edit1Text06Edit2Text07Button1CaptionShow to Chart8Button2CaptionClose9Timer1EnabledFalse10Chart--Check the NoteNote:

Double click on chart component, set the property of chart as below:


Click on  Add.. Button

Then the following chart gallery will be shown:



Choose the…