Quad Word

Home * Programming * Data * Quad Word

According to Intel's definition of a x86 16-bit Word, a Quad Word refers a 64-bit word.

=long long or long= Microsoft 64-bit C-compiler long is still 32-bit Double Word, while 64-bit GCC uses 64-bit Quad Words as longs. Other compiler require "long long" for 64-bit types.

typedef unsigned long QWORD; typedef unsigned long long QWORD;

=Bitboards= Quad words are used as bitboard datatype: typedef QWORD U64; typedef QWORD Bitboard;

=Ranges=

=Alignment= Quad Words stored in memory should be stored at byte addresses divisible by eight. Otherwise at runtime it will cause a miss-alignment exception on some processors, or a huge penalty on others.

=Endianness= Main article: Endianness.

Litte-endian Layout
The little-endian memory layout, as typical for Intel cpus. For instance the quad word integer 0x0102030405060708

Big-endian Layout
The big-endian memory layout, as typical for Motorola cpus. For instance the quad word integer 0x0102030405060708

=See also=
 * Byte
 * Word
 * Double Word
 * Bitboards

=External Links=
 * Dword, Qword, and Oword from Wikipedia
 * Byte from Wikipedia
 * Endianness from Wikipedia
 * Understanding Big and Little Endian Byte Order
 * IEN 137 - DAV's Endian FAQ - On Holy Wars and a Plea for Peace by Danny Cohen, U S C/I S I, April 1, 1980

Up one Level