Is Big Endian
viewed 3787 times and licensed 84 times
Returns true if the computer architecture is Big Endian, false otherwise.
Controller:
CodeCogs
Interface
#include <codecogs/computing/lowlevel/is_big_endian.h>
using namespace Computing::Lowlevel;
| bool | isBigEndian ()
Returns true if the computer architecture is Big Endian, false otherwise. |
These functions are available for Microsoft Excel (
Login to download):
| Boolean | cc_lowlevelIsBigEndian () |
Use the following HTML code to embed the calculators within other websites:
| Name | HTML Code |
|---|
isBigEndian
Returns true if the computer architecture is Big Endian, false otherwise. | |
IsBigEndian
For more information about the computer architecture theory behind this algorithm, please visit:
http://en.wikipedia.org/wiki/Endianness
Example 1
- The following program displays whether the computer architecture is Big Endian
or not (the opposite would most probably be Little Endian, but there are also
other non-Big Endian architectures).
#include <iostream>
#include <codecogs/computing/lowlevel/is_big_endian.h>
using namespace std;
int main()
{
cout << "Computer architecture is ";
if (Computing::Lowlevel::isBigEndian()) cout << "Big Endian.";
else cout << "Little Endian (or other non-Big Endian).";
cout << endl;
return 0;
}
Authors
- Lucian Bentea (August 2005)
Source Code
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
You must login to leave a messge