Question about Operating Systems

1 Answer

Programming in c

I need source codes in c that is converting hexadecimal numbers to binary, octal and decimal

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Vice President:

    An expert whose answer got voted for 100 times.

  • Expert
  • 258 Answers

To convert numbers you can use the printf() function
printf("%d", x'FF') hex to decimal
printf("%o", x'FF') hex to octal

If you want to save the value in another variables use sprintf
e.g

a = x'FF';
b = sprintf("%d",a)


Posted on Jan 16, 2009

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

2 Answers

How to convert a binary to text


Letters can be converted into decimal number using ASCII table. Every Character has it own equivalent number. Once converted into decimal (base 10), I could be easily converted into binary (base 2)
You could also use applications or web based applications such as ASCII to binary converter to help you convert it.

Jul 22, 2011 | Operating Systems

1 Answer

Can anybody tell me how to convert jpg image to its binary form??


may be this link will help you in making a project

http://www.codeproject.com/info/search.aspx?artkw=image+to+binary

Apr 22, 2009 | Microsoft Windows XP Professional

4 Answers

I need program source code for vertical redundancy check,longitudinal redundancy check,isochronous communication


#include<iostream.h>
#include<conio.h>

void main()
{
char bin[10],c;
clrscr();
cout<<"\n\n\n\nEnter 8 bit binary no.:";
cin>>bin;
cout<<endl;
for(int i=0;i<9;i++)
{
if(bin[i]=='1')
{
c++;

}


}
i++;

if(c%2==0)
{
bin[8]='0';
cout<<"Even";

}
else
{
bin[8]='1';
cout<<"Odd";
}
cout<<bin;
bin[9]='\0';
getch();
}

Feb 21, 2009 | Microsoft Windows XP Professional for PC

1 Answer

C++ programs using class declaration


a c++ program to convert decimal numbers to other number systems

Dec 22, 2008 | Operating Systems

1 Answer

C++ program for the conversion of decimal numbers to hexadecimal


all your solution is at
http://www.c.happycodings.com/Beginners_Lab_Assignments/code18.html

Dec 07, 2008 | Operating Systems

1 Answer

A c prog to convert decimal to hexadecimal number.


Sure, here you go:

int main(void) {
int input;
printf("Enter a decimal number: ");
scanf("%d", &input);
printf ("In hexadecimal, that is: %X\n\n", input);
return 0;
}

Oct 05, 2008 | Operating Systems

1 Answer

C ++


Nice try! Find an upper-class student to give you one-on-one tutoring with your homework assignment.

Sep 19, 2008 | Operating Systems

Not finding what you are looking for?
Operating Systems Logo

Related Topics:

94 people viewed this question

Ask a Question

Usually answered in minutes!

Top Operating Systems Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18297 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Prashant  Sharma
Prashant Sharma

Level 3 Expert

1127 Answers

Are you an Operating System Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...