Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
BIN2DEC bits 0-5 then 6-15
Anybody able to help ?
|
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
BIN2DEC bits 0-5 then 6-15
What are you trying to do? An example with data would help. -- protonLeah ------------------------------------------------------------------------ protonLeah's Profile: http://www.excelforum.com/member.php...o&userid=32097 View this thread: http://www.excelforum.com/showthread...hreadid=546099 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
BIN2DEC bits 0-5 then 6-15
THX for the interest
Equipment I work on outputs error messages in HEX which I then convert to Binary to obtain a Bit map which is then broken down into groups of Bits each group having a meaning for example:- Bits 0-5 = Resource number Bits 6-7 = Resource type I am trying to write a formula that will take the Hex value I enter convert it to a bit map and output the data in Dec with the value of Bit groups in different cells. "protonLeah" wrote: What are you trying to do? An example with data would help. -- protonLeah ------------------------------------------------------------------------ protonLeah's Profile: http://www.excelforum.com/member.php...o&userid=32097 View this thread: http://www.excelforum.com/showthread...hreadid=546099 |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
BIN2DEC bits 0-5 then 6-15
An interesting problem.
In B1 enter a valid 4-character hex value: 0000 thru FFFF In C1 enter: =HEX2BIN(LEFT(B1,1),4) & HEX2BIN(MID(B1,2,1),4) & HEX2BIN(MID(B1,3,1),4) & HEX2BIN(MID(B1,4,1),4) In D1 enter: =BIN2DEC(LEFT(C1,6)) In E1 enter: =BIN2DEC(RIGHT(C1,9))+512*MID(C1,7,1) I have assumed that bit #0 is the MSB. E & D are your decimal parts. Some typical values in B thru E a 0008 0000000000001000 0 8 0E46 0000111001000110 3 582 DEAD 1101111010101101 55 685 -- Gary's Student "Jim" wrote: THX for the interest Equipment I work on outputs error messages in HEX which I then convert to Binary to obtain a Bit map which is then broken down into groups of Bits each group having a meaning for example:- Bits 0-5 = Resource number Bits 6-7 = Resource type I am trying to write a formula that will take the Hex value I enter convert it to a bit map and output the data in Dec with the value of Bit groups in different cells. "protonLeah" wrote: What are you trying to do? An example with data would help. -- protonLeah ------------------------------------------------------------------------ protonLeah's Profile: http://www.excelforum.com/member.php...o&userid=32097 View this thread: http://www.excelforum.com/showthread...hreadid=546099 |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
BIN2DEC bits 0-5 then 6-15
Intersting solution But too complex for me I tried to get it to work let me
try and clarify the problem. Fault Additional Info Given in Hex Example H'ABCD AB CD Binary Value to obtain Bit Map 10101011 11001101 Bit 15 Bit 14 Bits 8-13 Bits 5-7 Bits 0-4 Which would decode Thus 1 0 101011 110 01101 43 6 13 Reverse Dir Busy Bit LCN DLT Time Slot Bits 14 and 15 if 1 Then True else False Regards "Gary''s Student" wrote: An interesting problem. In B1 enter a valid 4-character hex value: 0000 thru FFFF In C1 enter: =HEX2BIN(LEFT(B1,1),4) & HEX2BIN(MID(B1,2,1),4) & HEX2BIN(MID(B1,3,1),4) & HEX2BIN(MID(B1,4,1),4) In D1 enter: =BIN2DEC(LEFT(C1,6)) In E1 enter: =BIN2DEC(RIGHT(C1,9))+512*MID(C1,7,1) I have assumed that bit #0 is the MSB. E & D are your decimal parts. Some typical values in B thru E a 0008 0000000000001000 0 8 0E46 0000111001000110 3 582 DEAD 1101111010101101 55 685 -- Gary's Student "Jim" wrote: THX for the interest Equipment I work on outputs error messages in HEX which I then convert to Binary to obtain a Bit map which is then broken down into groups of Bits each group having a meaning for example:- Bits 0-5 = Resource number Bits 6-7 = Resource type I am trying to write a formula that will take the Hex value I enter convert it to a bit map and output the data in Dec with the value of Bit groups in different cells. "protonLeah" wrote: What are you trying to do? An example with data would help. -- protonLeah ------------------------------------------------------------------------ protonLeah's Profile: http://www.excelforum.com/member.php...o&userid=32097 View this thread: http://www.excelforum.com/showthread...hreadid=546099 |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
BIN2DEC bits 0-5 then 6-15
Hi Jim:
Thanks for the clarification. I'll update tomorrow, splitting the 16 bits into 5 groups: bit 15 bit 14 bits 13-8 bits 7-5 bits 4-0 -- Gary''s Student "Jim" wrote: Intersting solution But too complex for me I tried to get it to work let me try and clarify the problem. Fault Additional Info Given in Hex Example H'ABCD AB CD Binary Value to obtain Bit Map 10101011 11001101 Bit 15 Bit 14 Bits 8-13 Bits 5-7 Bits 0-4 Which would decode Thus 1 0 101011 110 01101 43 6 13 Reverse Dir Busy Bit LCN DLT Time Slot Bits 14 and 15 if 1 Then True else False Regards "Gary''s Student" wrote: An interesting problem. In B1 enter a valid 4-character hex value: 0000 thru FFFF In C1 enter: =HEX2BIN(LEFT(B1,1),4) & HEX2BIN(MID(B1,2,1),4) & HEX2BIN(MID(B1,3,1),4) & HEX2BIN(MID(B1,4,1),4) In D1 enter: =BIN2DEC(LEFT(C1,6)) In E1 enter: =BIN2DEC(RIGHT(C1,9))+512*MID(C1,7,1) I have assumed that bit #0 is the MSB. E & D are your decimal parts. Some typical values in B thru E a 0008 0000000000001000 0 8 0E46 0000111001000110 3 582 DEAD 1101111010101101 55 685 -- Gary's Student "Jim" wrote: THX for the interest Equipment I work on outputs error messages in HEX which I then convert to Binary to obtain a Bit map which is then broken down into groups of Bits each group having a meaning for example:- Bits 0-5 = Resource number Bits 6-7 = Resource type I am trying to write a formula that will take the Hex value I enter convert it to a bit map and output the data in Dec with the value of Bit groups in different cells. "protonLeah" wrote: What are you trying to do? An example with data would help. -- protonLeah ------------------------------------------------------------------------ protonLeah's Profile: http://www.excelforum.com/member.php...o&userid=32097 View this thread: http://www.excelforum.com/showthread...hreadid=546099 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
decimal to 16 bits binary conversion in Excel? | Excel Worksheet Functions |