Which .Net-compatible architectures are not little-endian?

The .Net Micro Framework 4.1 supports big-endian - Source


The CLI standard does not proscribe any particular Endianness, so if you want your program to be portable, you should not depend on a particular byte order... unless of course in scenarios where a particular byte ordering is required, such as with some data exchange protocols (thanks to user The Moof for pointing this out).

From the CLI Annotated Standard (p.161) — Partition I, section 12.6.3: "Byte Ordering":

For data types larger than 1 byte, the byte ordering is dependent on the target CPU. Code that depends on byte ordering may not run on all platforms. [...]

I suspect that you saw a hard-coded value for IsLittleEndian in Reflector because when you downloaded/installed the .NET Framework on your machine, that particular installation package was targeted at a particular platform (e.g. Intel x86, which is Little Endian).

I could thus imagine that there are other installation packages of the .NET framework that have IsLittleEndian hard-wired to return a different value, depending on the platform that particular installation targets.


SOME of the systems that the .NET Micro Framework runs on are (or can be...) big-endian. Version 4.1 introduced support for big-endian architectures.

You'd probably know if you were running on the micro framework, however...


Depends on what you mean by ".Net implementations". I'm not aware of Microsoft .NET Framework version for big-endian platform (but see other answers). But if you mean CLI/CLR implementation, then both Mono and DotGNU have versions for big-endian machines. Mono runs at least on Solaris 10 on Sparc and on Mac OS X on PowerPC. DotGNU has much wider list of available platforms.


If you're MSIL you don't get that guarantee.

Even if it's true for all current architectures, you have no guarantee I don't port .NET to Alpha or PDP11 tomorrow.


Comments

  1. Lee

    • 2015/9/16

    The CLI standard does not proscribe any particular Endianness, so if you want your program to be portable, you should not depend on a 

  2. Javion

    • 2021/6/7

    Which .Net-compatible architectures are not little-endian? The BitConverter class has a field IsLittleEndian which, according to the documentation: Indicates the byte order ("endianness") in which data is stored in this computer architecture. I notice in Reflector that the field is hard-coded to true in the static constructor of BitConverter.

  3. Abraham

    • 2019/11/13

    Indicates the byte order (“endianness”) in which data is stored in this computer architecture. I notice in Reflector that the field is hard-coded to true in 

  4. Frasheri

    • 2019/5/25

    Other file formats use some fixed endianness forrmat e.g, JPEG files are stored in big endian format. Which one is better — little endian or big endian? The term little and big endian came from Gulliver’s Travels by Jonathan Swift. Two groups could not agree by which end an egg should be opened -a- the little or the big.

  5. Johan

    • 2015/5/31

    The integer data that are directly supported by the computer hardware have a fixed width of a low power of 2, e.g. 8 bits ≙ 1 byte, 16 bits ≙ 2 bytes, 32 bits 

  6. Ulises

    • 2018/1/6

    The ARM architecture was little-endian before version 3 when it became bi-endian. Current architectures. The Intel x86 and AMD64 / x86-64 series of processors use the little-endian format. Other instruction set architectures that follow this convention, allowing only little-endian mode, include Nios II, Andes Technology NDS32, and Qualcomm Hexagon.

  7. Colt

    • 2016/6/30

    What .Net-compatible architectures are not small-endian? The BitConverter class has an IsLittleEndian field which, according to the documentation:

  8. Jace

    • 2018/6/2

    The C programming language, or any other high-level programming language for that matter, is not inherently big-endian or little-endian. Endianness of multi-byte values is driven by the CPU architecture, the file format you’re working with, or communication protocol you are working with.

  9. Reece

    • 2018/6/11

    Indicates the byte order ("endianness") in which data is stored in this computer architecture.

  10. Pellegrino

    • 2019/11/12

    In little endian format, the value would be calculated as follows: (0 x 16) + (1 x 1) + (2 x 4096) + (3 x 256) = 8961 10. In hex, this number would be represented as 2301 16 (or 0x2301). The important thing to remember is that the endianness describes the order in which a sequence of bytes are stored. Each byte is made up of two digits which

  11. Ismael

    • 2020/11/17

    PDP-11 had a little endian architecture while big endian machines like the PDP-6/PDP-10 predominated on the net. To make life more interesting, 

  12. Alfred

    • 2018/10/31

    Little-endian is an order in which the "little end" (least significant value in the sequence) is stored first. For example, in a big-endian computer, the two bytes required for the hexadecimal number 4F52 would be stored as 4F52 in storage (if 4F is stored at storage address 1000, for example, 52 will be at address 1001).

  13. Kylo

    • 2017/9/21

    However, the choice of not promoting the “colored book” outside the UK was quite 'little-endian' convention, this was not then regarded as sufificiently 

  14. Reece

    • 2019/2/12

    Unicode The net result of all the incompatible extensions to ASCII was that it became Little endian systems store or move the low-order byte first.

  15. Dax

    • 2020/12/29

    NET architecture—the Provider does not support multiple transactions per connection or It is known to be compatible with many other specialized .NET 

  16. Mehmeti

    • 2017/10/8

    If you are not within IX range, you can dial out on the CDMA IS-95 network, big-endian (www.nwfusion.com, Doc- Finder: 8535 ) or little-endian (www.nw 

Comments are closed.

Recent Posts