64 bit

This is a discussion on 64 bit within the C Programming forums, part of the General Programming Boards category; my programm is going to work on a i386 (32bit) with win2000. So the largest value a variable can holt ...

  1. #1
    Registered User stormbringer's Avatar
    Join Date
    Jul 2002
    Posts
    90

    64 bit

    my programm is going to work on a i386 (32bit) with win2000. So the largest value a variable can holt is 32 bit, with unsigned long. however, i need to wirk with values up to 64bit. how can i do this? i need to be able to access these numbers, calculate with them and so on.

    thanks for help

  2. #2
    Registered User stormbringer's Avatar
    Join Date
    Jul 2002
    Posts
    90
    i am curently using vc++: is the variable defntn then

    __int64 myvar;

    if i want to keep my code portable, which way would i go? i once read in an assembler book that you can "link" two 32bit registers together. i'm very unsure about that. but it should be possible to define one int as a high part and the other as the lower. (with that we could create 128bit and so on). i just got stuck how to work with that.
    anyway, i think i'll gona use the __int64. but i am interested in the answer on my second question anyways :-)

  3. #3
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    The best way is to typedef __int64 int64 or something similar.
    You can look at the source code to craftyftp://ftp.cis.uab.edu/pub/hyatt/v16/crafty-16.15.zip in
    chess.h

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  2. 64 bit programs
    By learning in forum C++ Programming
    Replies: 17
    Last Post: 05-11-2007, 12:26 AM
  3. A Question About Unit Testing
    By Tonto in forum C++ Programming
    Replies: 2
    Last Post: 12-14-2006, 08:22 PM
  4. Replies: 7
    Last Post: 12-10-2004, 08:18 AM
  5. bit patterns of negtive numbers?
    By chunlee in forum C Programming
    Replies: 4
    Last Post: 11-08-2004, 08:20 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21