473,473 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

where can I ask about byte ordering

Hey,
where can I ask about little and big endian stuffs? here or another
newsgroup?!
I just need help in representing string c = "place" and long b =
0x11223344 in a 16 bit word memory in the little and big endian format!!
thanx
Jul 22 '05 #1
6 1794
"Snake" <ha***@rogers.com> wrote...
where can I ask about little and big endian stuffs? here or another
newsgroup?!
Depends on what you need to know about it.
I just need help in representing string c = "place" and long b =
0x11223344 in a 16 bit word memory in the little and big endian format!!


What do you mean by "need help"? Do you just want somebody to write
it for you?
Jul 22 '05 #2
Snake wrote:
Hey,
where can I ask about little and big endian stuffs? here or another
newsgroup?!
I just need help in representing string c = "place" and long b =
0x11223344 in a 16 bit word memory in the little and big endian format!!
thanx


There are plenty of past articles that may help you ... here is one.

http://groups.google.com/groups?hl=e...iani.ws&rnum=9
Jul 22 '05 #3
Well, yes.I want to know how they are represented in the memory.so basically
I need someone to write them in the same way they are represented in the
memory.The reasin I am sking because I am confused whether the size of word
matters when they are stored in the memory (16 bit or 32 bit).
and Giani, thanx for the website, But I am not looking for the c++ code I
just want to know how place and 11223344 are represented in memory.

for example: int a = 0x5566
little endian: 66 55
big endian: 55 66
see,but how about "place" and "0x11223344"!!
Thanx alot

"Snake" <ha***@rogers.com> wrote in message
news:O4*********************@twister01.bloor.is.ne t.cable.rogers.com...
Hey,
where can I ask about little and big endian stuffs? here or another
newsgroup?!
I just need help in representing string c = "place" and long b =
0x11223344 in a 16 bit word memory in the little and big endian format!!
thanx

Jul 22 '05 #4
The following article might help:

http://www.eventhelix.com/RealtimeMa...ndOrdering.htm

Sandeep
--
http://www.EventHelix.com/EventStudio
EventStudio 2.0 - System Architecture Design CASE Tool
Jul 22 '05 #5
"Snake" <ha***@rogers.com> wrote in message news:<O4*********************@twister01.bloor.is.n et.cable.rogers.com>...
Hey,
where can I ask about little and big endian stuffs? here or another
newsgroup?!
I just need help in representing string c = "place" and long b =
0x11223344 in a 16 bit word memory in the little and big endian format!!
thanx


Hey! That easy!
unsigned char littleEndian[] = {0x44,0x33,0x22,0x11};
unsigned char bigEndian[] = {0x11,0x22,0x33,0x44};

HTH.
Bobo
Jul 22 '05 #6
Snake writes:
Well, yes.I want to know how they are represented in the memory.so basically I need someone to write them in the same way they are represented in the
memory.The reasin I am sking because I am confused whether the size of word matters when they are stored in the memory (16 bit or 32 bit).
and Giani, thanx for the website, But I am not looking for the c++ code I
just want to know how place and 11223344 are represented in memory.

for example: int a = 0x5566
little endian: 66 55
big endian: 55 66
see,but how about "place" and "0x11223344"!!
Big endian, little endian only applies to scalers (think atomic), not to
aggreagte types. And place is an aggregation of bytes. The problem arises
when a hardware register, which doesn't have an address in the normal
address space¹ has to be written to RAM.

Thanx alot

"Snake" <ha***@rogers.com> wrote in message
news:O4*********************@twister01.bloor.is.ne t.cable.rogers.com...
Hey,
where can I ask about little and big endian stuffs? here or another
newsgroup?!
I just need help in representing string c = "place" and long b =
0x11223344 in a 16 bit word memory in the little and big endian format!!
thanx


Note 1. Yes, I know there are exceptions.
Jul 22 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Vladimir | last post by:
Can anyone halp me with some questions? Is there multiplatform standart in binary representation of primitive datatypes when you writing it through BinaryWriter? In other words if I write by...
19
by: jeff | last post by:
how do you convert form byte to Int32 while retaining the binary value of the byte array
6
by: hmoulding | last post by:
This may be a FAQ, in which case you all may (probably will) yell at me. I haven't coded in plain C for almost 20 years, so I hope the following code is actually done right. Suppose the...
5
by: srikant | last post by:
I am writing a client in C# that needs to communicate over the network to a legacy C++ application that uses Unicode strings. I realize that C# strings are already in Unicode, however, how do I...
7
by: Mr. Mountain | last post by:
In the following code I simulate work being done on different threads by sleeping a couple methods for about 40 ms. However, some of these methods that should finish in about 40 -80 ms take as long...
33
by: Benjamin M. Stocks | last post by:
Hello all, I've heard differing opinions on this and would like a definitive answer on this once and for all. If I have an array of 4 1-byte values where index 0 is the least signficant byte of a...
34
by: Ann | last post by:
I am opening a file which looks like 0xABCDEF01 on another machine but 0x01EFCDAB on my machine. Is this a byte swapping? Could anyone give a good way to check if bytes are being swapped?...
10
by: bg_ie | last post by:
Hi, I have an array as follows - char arr; Now I wish to copy the following int - int tmp = 0x01020304;
4
by: Frederick Gotham | last post by:
What do you think of the following code for setting and retrieving the value of bytes in an unsigned integer? The least significant bit has index 0, then the next least significant bit has index 1,...
7
by: apollo135 | last post by:
Dear all, Could someone please clarify and help with byte ordering macro (big/litte endian conversion)? I found thefollowinf macron on the internet but I have a doubt to use it ... ============...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.