Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 11th November 2011
Braincode's Avatar
Braincode Braincode is offline
Ceriwis Addicted
 
Join Date: Nov 2011
Posts: 4,638
Rep Power: 20
Braincode mempunyai hidup yang Normal
Default <ASK> hexa ke binary

agan master programmer,,maap nih help dong.. ni kan ane ngebuat ASCII di C,,nah ane agak kebingungan convert huruf ke binary gan. coba liat dulu dah kode yg ane buat gan :



int lettertomorse(char lin[])

{

int i=0;

int x, b[100];



printf("\n\t ");

for( i=0; lin[i] !=''; i++)

{

if( lin[i] == ' ')

{

printf(" ");

}

if( lin[i] == 'A' || lin[i] == 'a') // This will accept Capital and small

{

for (x=65; x!=0; )

{

for (int i=1; i=1; j--) // REVERSE THE BINARY AND DISPLAY

printf ("%d", b[j]);



}





}



itu outputnya udah bisa..tapi kan itu proses huruf langsung ke binary gan..kalo ane mau pake proses huruf-hexa-decimal-binary,,nae ga nemu caranya convert hexa-decimal..bantuin gan..nyerah ane dan tmn2 ane mikir ginian 3hari lebih...



Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


 


All times are GMT +7. The time now is 06:50 AM.


no new posts