Bit meaning for a compiler.

Discussion in 'C++' started by CoDE++, Aug 21, 2010.

  1. CoDE++

    CoDE++ Guest

    what does 32 bit or 16 bit means when it is referred in terms of a
    compiler? For example what does 2 bit stand for when we state a
    complier as 32 bit.
    CoDE++, Aug 21, 2010
    #1
    1. Advertising

  2. CoDE++ <>, on 21/08/2010 14:39:44, wrote:

    > what does 32 bit or 16 bit means when it is referred in terms of a
    > compiler? For example what does 2 bit stand for when we state a
    > complier as 32 bit.


    Bits are bits, always and regardless of anything else: just one or zero.

    The thing that changes is the concept of byte. Ideally a set of 8 bits,
    but better called an octet for precision, as a byte can very well have
    other values (16 and 32, for example).

    Look up "define:byte" and "define:bit" on google, exactly as they are
    (no spaces around the colon but exclude the double quotes).

    If you want to know how many bits a "C++ byte" is, to the eyes of your
    compiler, print out the value of CHAR_BIT from <climits>.

    --
    FSC - http://userscripts.org/scripts/show/59948
    http://fscode.altervista.org - http://sardinias.com
    Francesco S. Carta, Aug 21, 2010
    #2
    1. Advertising

  3. On 22/08/2010 0.03, Francesco S. Carta wrote:
    > CoDE++ <>, on 21/08/2010 14:39:44, wrote:
    >
    >> what does 32 bit or 16 bit means when it is referred in terms of a
    >> compiler? For example what does 2 bit stand for when we state a
    >> complier as 32 bit.

    >
    > Bits are bits, always and regardless of anything else: just one or zero.
    >
    > The thing that changes is the concept of byte. Ideally a set of 8 bits,
    > but better called an octet for precision, as a byte can very well have
    > other values (16 and 32, for example).
    >
    > Look up "define:byte" and "define:bit" on google, exactly as they are
    > (no spaces around the colon but exclude the double quotes).
    >
    > If you want to know how many bits a "C++ byte" is, to the eyes of your
    > compiler, print out the value of CHAR_BIT from <climits>.


    I think he wanted to know what it means to say e.g. "this is a
    32-bit compiler". Pretty much off-topic, here. And I'm sure that
    with a little effort he can easily find the answer on the web.

    --
    Gennaro Prota | I'm available for your projects.
    Breeze (preview): <https://sourceforge.net/projects/breeze/>
    Gennaro Prota, Aug 21, 2010
    #3
  4. CoDE++

    Geoff Guest

    On Sat, 21 Aug 2010 14:39:44 -0700 (PDT), "CoDE++"
    <> wrote:

    >what does 32 bit or 16 bit means when it is referred in terms of a
    >compiler? For example what does 2 bit stand for when we state a
    >complier as 32 bit.


    The number of bits in a compiler refers to the basic number of bits
    that can be manipulated as a unit on the target machine (processor). A
    32-bit machine has a word size of 32 bits and presumably a bus width
    of that many bits. A 64-bit machine has twice that width. Compilers
    can be native or cross-platform, for example, a compiler might be
    capable of running on an x86 machine but targeting another processor
    like the M68000 (16-bit) or Z180 (8-bit) processors.

    It is also possible to run a 64-bit OS and a 64-bit version of a
    compiler and create 32-bit or even 16 or 8 bit executables.

    Apple's Xcode can produce "Universal" binaries that can run on their
    32-bit Intel machines and also on the PPC machines which had 32 and 64
    bit modes.
    Geoff, Aug 21, 2010
    #4
  5. Gennaro Prota <>, on 22/08/2010 00:26:11, wrote:

    > On 22/08/2010 0.03, Francesco S. Carta wrote:
    >> CoDE++<>, on 21/08/2010 14:39:44, wrote:
    >>
    >>> what does 32 bit or 16 bit means when it is referred in terms of a
    >>> compiler? For example what does 2 bit stand for when we state a
    >>> complier as 32 bit.

    >>
    >> Bits are bits, always and regardless of anything else: just one or zero.
    >>
    >> The thing that changes is the concept of byte. Ideally a set of 8 bits,
    >> but better called an octet for precision, as a byte can very well have
    >> other values (16 and 32, for example).
    >>
    >> Look up "define:byte" and "define:bit" on google, exactly as they are
    >> (no spaces around the colon but exclude the double quotes).
    >>
    >> If you want to know how many bits a "C++ byte" is, to the eyes of your
    >> compiler, print out the value of CHAR_BIT from<climits>.

    >
    > I think he wanted to know what it means to say e.g. "this is a
    > 32-bit compiler". Pretty much off-topic, here. And I'm sure that
    > with a little effort he can easily find the answer on the web.


    I know, I just wanted to fill the lower gap evidently contained in the
    higher question :)

    --
    FSC - http://userscripts.org/scripts/show/59948
    http://fscode.altervista.org - http://sardinias.com
    Francesco S. Carta, Aug 22, 2010
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    1,700
    Timothy Bendfelt
    Jan 19, 2007
  2. Replies:
    9
    Views:
    914
    Juha Nieminen
    Aug 22, 2007
  3. Replies:
    4
    Views:
    728
  4. BING BANG
    Replies:
    3
    Views:
    360
    Bill Davy
    Mar 15, 2012
  5. Jeff.M
    Replies:
    6
    Views:
    155
    Lasse Reichstein Nielsen
    May 4, 2009
Loading...

Share This Page