LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-12-2017, 03:40 PM   #16
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,208
Blog Entries: 4

Rep: Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764

Gentlebeings, may I very-cautiously advance the notion that, by now, "anyone who seriously expects to encounter any 'present objections' to their 'present plans' fully expects to be able to access a GPS database of ... 'our gravestones!'

"Bah!" "Humbug!!" "These kids(!) today!"

- - -

Seriously... "Big-endian vs. Little-endian" actually never mattered, any more than the sequence of bits within a <byte|X-word> within a serial transmission sequence. As long as "all of you somehow agreed," the technical particulars of your actual technical agreement never actually mattered – or needed to matter – to anyone at all. "You wrote some source-code to encode it and to send it, and then I wrote corresponding source-code to receive it and decode it, and ... 'lo and behold!!'" (Problem. Solved. "Gasp!!")

Last edited by sundialsvcs; 06-12-2017 at 03:43 PM.
 
Old 06-12-2017, 07:39 PM   #17
Laserbeak
Member
 
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508

Original Poster
Rep: Reputation: 142Reputation: 142
Actually I think I came into some endianness problems today, I was doing a for() loop over a variable I was referring to as hexadecimal and adding 0x01 instead of 0x1. That seemed to be the problem, and I think it was due to endianness.
 
Old 06-12-2017, 09:38 PM   #18
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Arch
Posts: 3,136

Rep: Reputation: 1336Reputation: 1336Reputation: 1336Reputation: 1336Reputation: 1336Reputation: 1336Reputation: 1336Reputation: 1336Reputation: 1336Reputation: 1336
Quote:
Originally Posted by Laserbeak View Post
I was referring to as hexadecimal and adding 0x01 instead of 0x1. That seemed to be the problem, and I think it was due to endianness.
Did you mean 0x10 instead of 0x1? Usually endianness doesn't affect ordering within bytes, because you can't address individual bits.
 
Old 06-12-2017, 09:52 PM   #19
Laserbeak
Member
 
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508

Original Poster
Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by ntubski View Post
Did you mean 0x10 instead of 0x1? Usually endianness doesn't affect ordering within bytes, because you can't address individual bits.
No, but it seemed to add 0x10 instead of 0x01.
 
Old 06-16-2017, 10:55 AM   #20
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,208
Blog Entries: 4

Rep: Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764
Actually, "endian-ness" can refer both to the ordering of bits within a byte (e.g. on a serial data-transmission stream), and/or to the ordering of those bytes. I have seen all four possible combinations in actual use.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Converting a binary file from little endian to big endian jaepi Programming 6 09-05-2011 09:51 PM
[SOLVED] A question about big-endian little-endian and how it affects things joeBuffer Programming 12 08-20-2009 01:02 PM
small-endian to big-endian conversion of data to store in a structure NancyT Programming 2 11-26-2008 10:06 AM
problem in understanding little endian/big endian machine program indian Programming 6 04-19-2006 02:50 PM


All times are GMT -5. The time now is 02:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration