[Include] Bit Functions
#5

updated (faster)
PHP Code:
SetValueBit(&valuebitpower); //power 0 or 1 
Added new macros:
PHP Code:
SetValueBitTrue(&valuebit);
SetValueBitFalse(&valuebit);

SetCellValue(&valuecellidmodepower);
GetCellValue(valuecellidmode);

MergeValueEx(byte1byte2byte3byte4);
Float:MergeFloatEx(byte1byte2byte3byte4); 
Function SetCellValue and GetCellValue

They are used to manipulate the n bit cells


Example:
PHP Code:
printf("%d, %d",GetCellValue(0x89ABCDEF,1,3),GetCellValue(0x89ABCDEF,1,8));
//print: 5, 205

//mode 3: 10 001 001 101 010 111 100 110 111 101 111 <-- cell id 0
//cell id 1 = 0b101 = 5

//mode 8: 10001001 10101011 11001101 11101111 <-- cell id 0
//cell id 1 = 0b11001101 = 205 
Reply


Messages In This Thread
Bit Functions - by AbyssMorgan - 09.10.2015, 18:31
Re: Bit Functions - by n0minal - 09.10.2015, 19:33
Re: Bit Functions - by AbyssMorgan - 09.10.2015, 19:36
Re: Bit Functions - by AbyssMorgan - 06.02.2016, 18:08
Re: Bit Functions - by AbyssMorgan - 15.03.2016, 19:16
Re: Bit Functions - by iKevin - 15.03.2016, 19:39
Re: Bit Functions - by AbyssMorgan - 27.03.2017, 15:28
Re: Bit Functions - by czop1223 - 28.05.2017, 18:33
Re: Bit Functions - by AbyssMorgan - 28.05.2017, 20:06
Re: Bit Functions - by czop1223 - 02.06.2017, 11:58

Forum Jump:


Users browsing this thread: 1 Guest(s)