I'm looking for a simple solution to my problem. I want do modify a single bit into a large binary file. The offset of this bit is known and constant.
For example:
Because I'm writing a tutorial for beginners this thing should be very easy and no download (scripts, etc) should be done. Is there any possibility to do this?
Please elaborate on the nature of the modification. Will the case always be as in your example, lowest order bit, which is guaranteed to be zero, toggled to 1 (essentially, just adding 1 to the byte's value)? Or, is the solution required to work on other bits in a byte? And, if the byte is already 1, should it be left unchanged, or should it be toggled to zero? I assume, regardless, that unlike addition, there should be no carry over into higher order bits?
First of all, the goal is to create a second file that differs only in this byte from the original one. The process is only done once.
It would be nice, if the original mask of the byte would not be changed, but at this time this is not a must have. "X" should be don't cares, but assume that they are zeros.
I've found a solution to overwrite a certain byte in a file via dd:
Is there any possibilty to echo non-printable characters via there ascii-code (I need 0x01)? Sorry, I'm new to shell using..
It seems that the BSD-Version of echo doesn't have the '-e' switch..
Hello everyone.
I bought a dell laptop (XPS M1330) online which came without a hard drive. There is a Windows Vista Ultimate OEMAct sticker with product key at the bottom case. I checked dell website (here) for this model and it says this model supports both 32 and 64-bit version of Windows... (4 Replies)
Hello *nix specialists,
Im working for a non profit organisation in Germany to transport DSL over WLAN to people in areas without no DSL. We are using Linksys WRT 54 router with DD-WRT firmware There are at the moment over 180 router running but we have to change some settings next time. So my... (7 Replies)
Hi,
Here is the issue. From the program snippet I have Base: 0x1800000000, Size: 0x3FFE7FFFFFFFF which are of 40 and 56 bits. SO I used use bignum to do the math but summing them up I always failed having correct result.
perl interpreter info,
perl, v5.8.8 built for... (0 Replies)
Can someone try to compile this older version of xtide (attached) on 64-bit Intel/Linux and upload the xttpd binary? I have a friend who needs an older version up and running because the newer version does not support his required harmonic files.
Thanks! (7 Replies)
Folks ,
I have a korn shell script that i have written for assembly, the variable that is a final result is returning hexadecimal, now the value is to be converted to binary and return the place holder in the binary that has a 1 in its place and send it to a variable assigned for the... (0 Replies)
Hi,
I have two Solaris machines.
1. SunOS X 5.8 Generic_108528-29 sun4u sparc SUNW,Sun-Blade-1500
2. SunOS Y 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-60
I am trying to buiild a project on both these machines. The Binary output file compiled on machine 2 runs on both the machines. Where... (0 Replies)
I'm writing both 8-bit and wide 16-bit data to the screen and an output file. I have no problems with writing out to the screen - for example:
cout<<8-bit data;
wcout<<16-bit data;
Similarly, I have used ofstream for 8-bit and wofstream for 16-bit, for example:
ofstream out;
wofstream wout;... (1 Reply)