|
|
|
|
|
by fuzztester
1071 days ago
|
|
>>I don't think I've ever seen a computer where memory is actually a continuous array of bits sorted by memory address. I may be being pedantic or outright wrong (since it's been a while since I used C), but I don't think C can address memory by individual bit. You have to read one or more bytes from memory, twiddle the bits in them, using C's bitwise operators (like !, &, | and tilde), and then write the changed bytes back to memory at the same addresses you read them from. At least for the earlier C versions I used, this was the case, IIRC. And to read and write those bytes, you do it via scalar variables like ints or longs, or via structs or arrays, or via pointers. Or using library functions like memset(). |
|