Big Endian -> Little Endian

General FreeBASIC programming questions.
jevans4949
Posts: 1156
Joined: May 08, 2006 21:58
Location: Crewe, England

Re: Big Endian -> Little Endian

Postby jevans4949 » Jul 27, 2018 1:13

First computer I used as a student, Elliott 4100, had 24-bit integers and floats as standard, 6-bit character codes. Think ICT 1900/2900 used similar format.

Intel 4004 calculator chip, predecessor of all Intels, had 4-bit integers. Only need 4 for a decimal digit!

Depended how many transistors or valves you could squeeze on to your processor board.
jevans4949
Posts: 1156
Joined: May 08, 2006 21:58
Location: Crewe, England

Re: Big Endian -> Little Endian

Postby jevans4949 » Jul 27, 2018 1:34

According to Wikipedia, MIDI predates the home computer, and originated in the synthesiser business. The Standard Midi File format was a bit of an add-on.
counting_pine
Site Admin
Posts: 6229
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Big Endian -> Little Endian

Postby counting_pine » Jul 27, 2018 13:33

Just to say, with Endian-specific code, it’s probably best to abstract out the byte swapping and only use it in code that reads/writes the values from/to the code. This is the only part of the code that needs to be Endian-specific.
That way, you can work in your native Endian format, whichever it may be, and never have to worry about it going forward.

Return to “General”

Who is online

Users browsing this forum: integer and 9 guests