answersLogoWhite

0


Best Answer

for example:

unsigned char attach (unsigned char byte, unsigned char bit)

{

unsigned char mybyte;

mybyte = byte&0x7f;

if (bit) mybyte |= 0x80;

return mybyte;

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you attach parity bit in c language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the error detection technique that can detect errors with only one bit?

(a) simple parity check (b) two-dimensional parity check (c) crc (d) checksum


Which language is used for windowsxp?

Mainly C and C++ and a bit of assembly language.


What is long components in the C programming language?

A 32 bit integer.


What is medium programming language?

actually it is the c which is known as medium level language because it can perform operations bit by bit as a low level language and is suitable for making any application software as a high level language


What programming language are most Nintendo DS games written in?

They are written mostly in C and C++ with a bit of Assembler.


Why C language is called mid level language justify with an example?

C language support bit-level manipulation that are normally done in assembly or machine level language. C reduce the gap between high level and low level language. So, it's called as middle level language.


What is a parity bit?

Parity bits are used as a form of error checking during the transmission of information. When old modems transmitted data over a network or communications device, the data was encoded into a series of ones and zeros called bits (modern modems send information in packets and check for errors in different ways, so a parity bit is unnecessary). A single bit can describe only two possible states, 0 (off) or 1 (on). Several bits are thus needed to describe a letter or number. A total of seven bits are used to describe the set of ASCII characters, which include the letters and numbers that compose this document. The letter "A", for example, has ASCII code 65, which in binary is 1000001. Note that each binary digit corresponds to a power of two, and 65, which is two to the sixth power plus two to the zeroth power, has ones in only the sixth and zeroth columns of its binary representation. The letter C, with code value 67, has the binary sequence 1000011. Because noise or electrical interference may sometimes interfere with the transmission of data, it is useful to have some way to easily detect errors in information as it is exchanged. One way to do this is to add an eighth bit to characters that are transmitted, called a parity bit. The parity bit is chosen such that all correctly transmitted characters will have either an even or odd number of ones. Thus, if a zero were placed at the start of the code for the letter A, producing 01000001, a one would be placed before the code for C, producing 11000011. The prefixes shown here produce binary codes with an even number of ones (and zeros), and the added bit is thus called an even parity bit. The leading ones and zeros could also be chosen to always produce odd numbers of ones and zeros, and this scheme is called odd parity. Familiar settings in communications programs are E7, which uses one even parity bit and seven data bits, and N8, which indicates no parity bit and the use of all eight bits for transmitting data. Use of the wrong parity setting in a communications program may produce screens full of garbage characters. If this happens, check to see what parity settings the computer to which you are connecting expects. If you do not have this information, try connecting with a different parity setting and see if this produces legible text.


What do you mean by c plus plus?

C++ is a programming language, but, in the same time, it's a valid expression. Example:A= C++is equivalent with:A= C, C= C+1It's a bit of a joke. In the programming language C, ++ is the increment operator, so C++ can be interpreted as "C, except one better."


Is PHP an easy language to learn?

I found it easy because I already knew a fair bit of C++, C and Perl. The syntaxes are very similar


Why c language has name c why not a?

C-language was derived from B-language.


Why bit masking is required in c language?

Bit masking is required whenever we need to invert a group of bits in a bit field. Bit masks allow us to perform these changes in a single operation rather than one bit at a time.


Why C prefered more vb.net in asp.net?

Just a little bit more things on it it just is a different language then VB.Net.