duminică, 22 iulie 2012
sâmbătă, 14 iulie 2012
nibble - Preluare de pe Vikipedia
Table of nibbles
The sixteen nibbles and their equivalents in other numeral systems:
0hex | = | 0dec | = | 0oct | 0 | 0 | 0 | 0 | |||
1hex | = | 1dec | = | 1oct | 0 | 0 | 0 | 1 | |||
2hex | = | 2dec | = | 2oct | 0 | 0 | 1 | 0 | |||
3hex | = | 3dec | = | 3oct | 0 | 0 | 1 | 1 | |||
4hex | = | 4dec | = | 4oct | 0 | 1 | 0 | 0 | |||
5hex | = | 5dec | = | 5oct | 0 | 1 | 0 | 1 | |||
6hex | = | 6dec | = | 6oct | 0 | 1 | 1 | 0 | |||
7hex | = | 7dec | = | 7oct | 0 | 1 | 1 | 1 | |||
8hex | = | 8dec | = | 10oct | 1 | 0 | 0 | 0 | |||
9hex | = | 9dec | = | 11oct | 1 | 0 | 0 | 1 | |||
Ahex | = | 10dec | = | 12oct | 1 | 0 | 1 | 0 | |||
Bhex | = | 11dec | = | 13oct | 1 | 0 | 1 | 1 | |||
Chex | = | 12dec | = | 14oct | 1 | 1 | 0 | 0 | |||
Dhex | = | 13dec | = | 15oct | 1 | 1 | 0 | 1 | |||
Ehex | = | 14dec | = | 16oct | 1 | 1 | 1 | 0 | |||
Fhex | = | 15dec | = | 17oct | 1 | 1 | 1 | 1 | |||
[edit]Examples
0100 0010 = 42 |
---|
0010 0000 1001 = 209 |
0001 0100 1001 = 149 |
0011 1001 0110 = 396 |
0001 0000 0001 = 101 |
0011 0101 0100 = 354 |
0001 0110 0100 = 164 |
[edit]Extracting a nibble from a byte
#define HI_NIBBLE(b) (((b) >> 4) & 0x0F) #define LO_NIBBLE(b) ((b) & 0x0F)
where
b
must be a variable or constant of an integer data type. (Of course, if b is more than a byte wide, only one of the bytes will be considered).
For example,
HI_NIBBLE(0xAB)==0xA
and LO_NIBBLE(0xAB)==0xB
.
In Common Lisp:
(defun hi-nibble (b) (ldb (byte 4 4) b)) (defun lo-nibble (b) (ldb (byte 4 0) b))
marți, 12 iunie 2012
de cate feluri pot fi variabilele - daniel stefan
DATA TYPE | DESCRIPTION | SIZE (NUMBER OF BITS) | RANGE OF VALUES |
---|---|---|---|
bit | One bit | 1 | 0 or 1 |
sbit | One bit | 1 | 0 or 1 |
byte, char | Character | 8 | 0 ... 255 |
short | Signed short integer | 8 | -127 ... 128 |
word | Unsigned integer | 16 | 0 ... 65535 |
integer | Signed integer | 16 | -32768 ... 32767 |
longword | 32-bit word | 32 | 0 ... 4294967295 |
longint | 32-bit signed word | 32 | -2147483648 ... 2147483647 |
float | Floating point | 32 | ±1.17549435082*10-38 ... ±6.80564774407*1038 |
marți, 1 mai 2012
Daniel Stefan
Schema cu emitator ton DTFM
http://hackedgadgets.com/2007/03/27/alarm-phone-dialer/
DTMF transmitter
DTMF receiver
MT8870(CM8870PI)
http://www.qsl.net/oe3mzc/mt8870.gif
Schema cu emitator ton DTFM
http://hackedgadgets.com/2007/03/27/alarm-phone-dialer/
DTMF transmitter
DTMF receiver
MT8870(CM8870PI)
http://www.qsl.net/oe3mzc/mt8870.gif
Abonați-vă la:
Postări (Atom)