From: Andrew Haley <aph@redhat.com>
To: gcc-help@gcc.gnu.org
Subject: Re: using hex in gcc
Date: Thu, 07 Jun 2012 11:06:00 -0000 [thread overview]
Message-ID: <4FD08B28.7000802@redhat.com> (raw)
In-Reply-To: <CAAdqfvaZ6bfh69Mz+D_+XbpDv2rdmq1-wZBu_gzGJbycEx2P0g@mail.gmail.com>
On 06/07/2012 07:33 AM, dhruv pant wrote:
> thanks got it...i was actually thinking in some other way....
> so basically everything is actually stored in binary form.it's for our
> convenience and readability that we are converting them to hex or
> decimal.....
> so suppose...
> unsigned int i=10
> printf("%x",i) //this will print the hex equivalent of 10?
Exactly. Pocket calculators usually store numbers in decimal,
because for them most of the work is in the I/O. Computers
usually store numbers in binary: how you print it is up to you.
Andrew.
prev parent reply other threads:[~2012-06-07 11:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 17:14 dhpant2806
2012-06-06 20:33 ` Ángel González
2012-06-07 6:34 ` dhruv pant
2012-06-07 11:06 ` Andrew Haley [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FD08B28.7000802@redhat.com \
--to=aph@redhat.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).