Can someone please clarify where im going wrong. I'm at this 2 hours... I know that the first parity in the code includes itself and skips every first number after it in a yes and no sequence. the second skips every second set of numbers after itself and the following number. The 4th should skip 4 after including itself and the first 3 numbers.These are my message bits in its original form: 1101011011000110 and I want to add the hamming parity bits onto them. ? = Parityso this means ??1?101?01101100011?0 Parity 1 = ?110110010 Parity 2 = ?1...Read more

Let me give you an example, let's consider the strings:1000010101110000and the full range of 2-bits strings:00011011i am wondering if there is a function that has an inverse and that maps the 4 4-bits string to the 2-bits strings....Read more

(Quick version: jump to paragraph next to the last one - the one beginning with "But")I was happy in my ignorance believing that PVRTC images were 4 or 2 bits per channel. That sounded plausible. It would give 4+4+4+4 (16 bit) or 2+2+2+2 (8 bit) textures, that would have 2^16 (65536) and 2^8 (256) color depth respectively. But reading through some documents about PVRTC, I suddenly realized that it said 4 bpp (and 2 bpp), i.e. 4 bits per pixel. Confusion and madness entered my world.What?! 4 bits? Per pixel? But that's just 1 bit per channel! (A...Read more

I'm trying to solve a riddle in a programming test. Disclaimer: It's a test for a job, but I'm not looking for an answer. I'm just looking for an understanding of how to do this. The test requires that I come up with a set of solutions to a set of problems within 2 weeks, and it doesn't state a requirement that I arrive at the solutions in isolation.So, the problem:I have a 32-bit number with the bits arranged like this:siiiiiii iiiiiiii ifffffff ffffffffWhere:s is the sign bit (1 == negative) i is 16 integer bits f is 15 fraction bitsThe assi...Read more

I'm doing an exercise. But I'm confused on how to calculate the megabytes A “genome” can be represented as a sequence of “bases”, each of which can be encoded as a two-bit value. Assuming that a megabit is 1,000,000 bits, how many megabytes are required to encode a 16 million base genome?...Read more

I want to use a function that returns a uint32_t which is supposed to contain 8 bits of information, in little-endian format. Could someone give me some c++ code on how to extract these bits from the uint32_t type into chars, booleans or into any other type that does not need the use of the Force to deal with! Because right now I do not have the patience to understand the whole concept of endianess. And the more I shallowly search the more complicated it seems...Thanks for your understanding!PS. Although not what I am looking for, if someone co...Read more