Re: Data Types in Visual Basic

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jim Carlock (anonymous_at_127.0.0.1)
Date: 07/07/04


Date: Wed, 7 Jul 2004 02:05:36 -0400

I think it's because of historical compatibility issues.

At some point maybe a decade ago, Microsoft decided that
the 32-bit platform was the way to go, and it stuck. The fact
that a boolean value is 16-bit, is because MS decided that
there are more uses for a 16-bit value than there are for an
8-bit value. In fact, if you look into the API, you'll see a lot
of function calls that return a 32-bit value instead of a 16-bit
value.

The general purpose registers are EAX, EBX, ECX, EDX
and a few others. These are 32-bit registers. However, there
still exist some 16-bit memory addressing registers, which
have remained in effect since the 286 microprocessor came
into play (or maybe even earlier with 8086 processor).

The general purpose registers above can be represented as
16-bit or 8-bit registers as well. The lower 16 bits of the EAX
registers makes up the AX register. The two bytes of the AX
register then can be broken down into byte representations,
AL and AH.

However, ever since the 386 came into play, 32-bit processing
was optimized to provide a little more speed than using 8-bit
processing.

But for the most part, I think it's for compatibility issues and
maintaining compatibility with older operating systems.

-- 
Jim Carlock
http://www.microcosmotalk.com/
Post replies to the newsgroup.
"rami mizrahi" <ramilb80@hotmail.com> wrote in message news:e4K3Dx6YEHA.992@TK2MSFTNGP10.phx.gbl...
Why does Visual Basic .NET reserve two bytes for the boolean data type
while one byte is enough to store a "0" or a "1"? I was told that this
is due to the architecture of 32 bit processors and that they would have
to expand 8 bit instructions to at least 16 bit to be able to process
them (which is not efficient). I would like to get detailed information
about this. Is this related to the fact that most x86 processors are
little Endian?
Thank you!
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!


Relevant Pages

  • Re: CIL question
    ... > compilation as execution methods. ... They need different representations for 32 ... intermediate representation with a infinite number of registers (e.g. ...
    (comp.compilers)
  • Re: Quiz time
    ... we'll all see an improvement if more play. ... Anyone who registers for both competitions using the same name and ... UPS/FUNTO March stats: http://homepage.ntlworld.com/my.web.pages/stats/ ... Now in the eighth year of reporting. ...
    (uk.people.silversurfers)
  • tech: ringmaster not detecting hits
    ... detecting hits while in play but registers perfectly in test mode. ...
    (rec.games.pinball)
  • Re: Need advice from blues/rock fingerpickers
    ... (I put a Herco thumb pick on my index finger, ... which I play with my thumb and middle finger. ... registers and "screech" in the high registers, ...
    (alt.guitar)
  • Re: processors of the future: super-computer-on-a-chip?
    ... I think this design might come with obstruction-free KCSS... ... Sparc doesn't exactly have a lot of registers to play with. ...
    (comp.arch)