World's most popular travel blog for travel bloggers.

[Solved]: Why the Smallest Operable Data Type in Most Programming Languages Is One-Byte Sized?

, , No Comments
Problem Detail: 

Why the smallest operable data type in most programming languages is one-byte sized? Is it possible that to operate with a single bit? If it is possible, how to do it in practical?

Asked By : WeZZard

Answered By : adrianN

That has mostly historical reasons. See Wikipedia:Byte. Operating on single bits is of course possible. How to do it depends on the programming language. In most languages you have bit level operators for AND, OR, XOR and so forth that you can use to manipulate single bits in a byte. In C you can use bit field structs to define data-types that are (logically) smaller than a byte.

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/59681

 Ask a Question

 Download Related Notes/Documents

0 comments:

Post a Comment

Let us know your responses and feedback