Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
the registers of a x68 architexture based computer are EAX,EBX,ECX,EDX,ESP,EBP,ESI,EDI and EIP .
each of them consists of 32 bits that means 4 bytes that means they can hold values up to FFFFFFFF =4.294.967.295 !
but int64 values require 8 bits . so how can computers with 32-bit registers declare and manipulate 64-bit values ???
Posted 22-Jul-11 22:31pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

They are stored as double words. This article[^] discusses this from a basic perspective.
For more detailed analysis, you probably need to read a few processor programming articles / whitepapers.
 
Here[^] is more information on the word.
  Permalink  
Comments
SAKryukov at 24-Jul-11 1:22am
   
Certainly good to read. My 5. I don't understand OP's confusion. What's the problem to develop simple arithmetic for integers of N bytes, where N is any natural number?
--SA
Abhinav S at 24-Jul-11 2:10am
   
Thank you.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Some instructions will works on a pair of registers while other might be implemented in software. Thus if your application does a lot of 64 bits arithmetic, it might be faster when running as a 64 bit application.
 
By the way, it would be very easy to know by looking at the disassembly code. Simply compile an unmanged application both in 32 bit and 64 bit with some arithmetic on 64 bits numbers and you will have a good idea of what the compiler does.
 
You can uses Visual C++ Express 2010 for that.
  Permalink  
Comments
SAKryukov at 24-Jul-11 1:22am
   
Good point, a 5.
--SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

see below
 
http://en.wikipedia.org/wiki/Integer_%28computer_science%29
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Kornfeld Eliyahu Peter 169
1 Zoltán Zörgő 139
2 George Jonsson 135
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,342


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 14 Sep 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100