Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
3.67/5 (3 votes)
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

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.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 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 24-Jul-11 2:10am    
Thank you.
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.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 24-Jul-11 1:22am    
Good point, a 5.
--SA
see below

http://en.wikipedia.org/wiki/Integer_%28computer_science%29
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900