Вот выдержка, кто сказал что байты 8-битные? (+)
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)

миниатюрный аудио-видеорекордер mAVR

Отправлено SM 27 ноября 2004 г. 20:14
В ответ на: Оопс! А я всегда наивно считал что sizeof жестко забит на байт. отправлено undefined 27 ноября 2004 г. 20:01

The definitions of object, bit, byte, and alignment reflect a strong consensus, reached after considerable discussion, about the fundamental nature of the memory organization of a C environment:

All objects in C must be representable as a contiguous sequence of bytes, each of which is at least 8 bits wide.

A char (or signed char or unsigned char) occupies exactly one byte.
(Thus, for instance, on a machine with 36-bit words, a byte can be defined to consist of 9, 12, 18, or 36 bits, these numbers being all the exact divisors of 36 which are not less than 8.) These strictures codify the widespread presumption that any object can be treated as an array of characters, the size of which is given by the sizeof operator with that object's type as its operand.

Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru