Re: Bits Programming Computer Science by DevonMcC++ …. Each word in this computer is 16 bytes. How many bits are needed to address each word in memory?[/QUOTE] Assuming… by 256MB you mean 2^28, you'd need 28 bits to address all the bytes; to address only words, you… = (2^28)/(2^4) = 2^24, or 24 bits. However, the number of bits needed really depends on how much memory the… Re: bits Programming Software Development by AssertNull … containing 0 or 1. typedef unsigned char bits[CHAR_BIT]; typedef struct { unsigned char val; bits theBits; }byte; void set(byte* aByte, unsigned… Re: bits Programming Software Development by johans22 … more memory space than typedef unsigned char bits[CHAR_BIT]; typedef struct { unsigned char val; bits theBits; }byte; ??. Or, just that your code… Re: bits Programming Software Development by AssertNull If you want to work on the bits directly, there's no need for an array or a union. You have your structure, you change a data element, and the bits change with it. I don't think this is what the OP wants though. Then again the OP is exploring/experimenting and part of that is figuring out what you want. Bits Programming Computer Science by snucho A computer has 256MB of memory. Each word in this computer is 16 bytes. How many bits are needed to address each word in memory? bits Programming Software Development by johans22 … to the values of Val3, ValArray1,ValArray2 and ValArray3, the bits changes on the fly. Re: bits Programming Software Development by rubberman Time to learn about bit fields. Not difficult, but we don't do your homework for you. Also, what do you mean by "changes on the fly"? What is changing the bits? An interrupt routine? Other code? Another thread? Bits manipulation - Modified Huffman Programming Software Development by suncica2222 …] as you see i need to replace pixel (bits) sequence with some bits sequence variable length so im not sure which type….com/cpp/cpp/cpp_...nipulation.htm[/url] and this for bits array [url]http://www.codeguru.com/cpp/cpp/cpp_...ms…-of-Bits.htm[/url] so the dificult part is that all those… Bits and bytes Programming Software Development by HITMANOF44th …control.cs //========================================================== public string PinOn(int pin1) { bits |= Convert.ToUInt16(1 << pin1); …quot;; } public string PinOff(int pin1) { bits &= ~(1 << 3); … Re: Bits and bytes Programming Software Development by sandeepjkl a bits is a numerics single value, either 1 or 0 that encodes a single unit of digital information. A byte is a sequence of bits; usually eight bits equal one byte. Re: Bits in a byte Programming Software Development by Narue …clarify. [B]>I've read that the bits in a byte (in c++) are implementation …'t rely on a byte always having eight bits. [B]>Does it mean implementation of …tux: [B]>A byte is just always eight bits[/B] Incorrect. "Byte" is an … more systems are gravitating toward the octet (eight bits, for the terminology-challenged) for a byte, … Re: Bits manipulation - Modified Huffman Programming Software Development by suncica2222 …'t problem yet,because I have problem dumping even unchanged bits array to file.bin help me dump bit_array_c to file… Re: Bits and bytes Programming Software Development by HITMANOF44th i figured it out bits & ~(1 << pin) will actully work when you put it into a static int and return bits & ~(1 << pin) Bits, Part 3 Programming Software Development by Dave Sinkula ….html]Part 2[/url], you may have noticed that the bits representing the [i]value[/i] of an [font=courier new…]unsigned int[/font] did not appear to match the bits representing the [i]object[/i]. This is because of the…][/i] of my implementation. When it comes to displaying the bits of objects that take more space that a char, this… bits of all types of files(txt,mp3,gpn etc) Programming Software Development by tedtdu … ideas and thought about following. I need to get binary bits of variety of files regardless of ASCII, Unicode, or even… following seems to be commonly used but not for all. bits[i] = ((1<<i) & c) != 0 ? 1:0…[j]); Will you please provide any other way of getting bits of files??? This is important task for me, and any… Re: Bits and bytes Programming Software Development by HITMANOF44th … missing is the WriteToCard(); function and the declared variables of bits to make this work, my main issue that i am… Re: Bits Concatenation C++ Programming Software Development by vijayan121 …< unsigned char >::digits > bits ; std::cout << bits(x).to_string() + bits(y).to_string() + bits(z).to_string() << '\n' ; }[/code… Re: bits of all types of files(txt,mp3,gpn etc) Programming Software Development by Labdabeta If you are trying to break a byte into bits you can do this: struct byte{ bool bit[8]; }; byte …breakByte(uint8_t val)//break val into individual bits { byte ret; for (int i=0; i<8; ++i… Re: Bits in a byte Programming Software Development by tux4life … is a general term for any valid combination of eight bits (and a bit is a one or a zero) ('To… size of a byte' ?? A byte is just always eight bits, you cannot hesitate here) An example of a byte would… from the implementation) [B]>I've read that the bits in a byte (in c++) are implementation or system dependent… Re: Bits in a byte Programming Software Development by gnobber … differently. The C++ byte consists of at least enough adjacent bits to accommodate the basic character set for the implementation. That… of which can be accommodated by 8 bits, so the C++ byte is typically 8 bits on systems using those character sets… Bits, Part 1 Programming Software Development by Dave Sinkula It is often instructive to display the bits of a value. (This is similar to 'converting' an integer to binary.) The way I have done this in this snippet is to start at the most significant bit and work your way through all the rest of the bits. (Continued in [url=http://www.daniweb.com/code/snippet149.html]Part 2[/url].) Re: Bits in a byte Programming Software Development by MosaicFuneral …=Narue;888862][B]>A byte is just always eight bits[/B] Incorrect. "Byte" is an abstract term for… more and more systems are gravitating toward the octet (eight bits, for the terminology-challenged) for a byte, it's by… Re: Bits in a byte Programming Software Development by jephthah … was whether C++ defines a byte as being exactly 8 bits. as several of us have learned, it does not. it…;]wide variety of byte sizes[/URL], from 6 to 36 bits and all sizes in between. see Clines' [URL="http… Re: Bits in a byte Programming Software Development by ArkM >not many people will ever touch something like a 4-bit machine or any other sort of setup. None the less there were supercomputers with 6-bits and 9-bits (or may be 12) bytes ;) Moreover, I have seen a real computer with various byte widths (every 6-th byte was shorter than others)... ;) Re: bits n junk Programming Software Development by Narue … bit integer has an even or odd number of 1 bits using ONLY bitwise operations?[/QUOTE] First, ! and + aren't bitwise…'ll be nice and provide a partial solution since counting bits without a loop is somewhat non-trivial. It's partial… Bits in a byte Programming Software Development by gnobber I've read that the bits in a byte (in c++) are implementation or system dependent. … Re: Bits in a byte Programming Software Development by tux4life … those possible combinations don't fit in 1 byte (= 8 bits), so multiple bytes have to be used to make it… Re: Bits in a byte Programming Software Development by gnobber … to do with the size of a byte (no. of bits) so i'm assuming that to support a 32-bit… Re: Bits in a byte Programming Software Development by gnobber … to do with the size of a byte (no. of bits) so i'm assuming that to support a 32-bit… Re: Bits in a byte Programming Software Development by Narue … portable?[/B] When ASCII was designed, only the first seven bits were required to hold the characters the designers wanted. To…