Re: How do i change numerics into binary numbers?
- From: "Rick Rothstein \(MVP - VB\)" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx>
- Date: Tue, 3 Oct 2006 00:21:26 -0400
Let me start afresh.
Input:
1) Message ID bits 1-6
2) Data Terminal bits 7
3) Data Indicator bit 8
4) User ID bits 9-38
5) Current status bits 39-42
6) Rate of turn bits 43-50
7) Speed bits 51-60
8) Positional accuracy bits 61
9) Longitude bits 62-89
10) Latitude bits 90-116
11) Direction bits 117-128
12) True Heading bits 129-137
13) Repeat indicator bits 144-145
14) Reserved bits 146-149
15) Spare bits 150
16) State of communication bits 151-168
A typical entry: bit description
1) message 1 000001
2) not available 1
3) not available 0
4) 127 000000 000000 000000 000001 111111
5) mobile 0000
6) 1.1 degree/minute 000001 01
7) 61.2 Km/hr 100110 0100
8) Low 0
9) 27degrees 5minutes 000011 110111 111101 001001 0000
10) 5degrees 5mins 000001 011101 000101 000010 000
11) 95.9 degrees True 001110 111111
12) 351 degrees True 101011 111
13) not repeated 00
14) "reserved" 0000
15) "spare" 0
16) UTC indirect 01
1 frame remaining 01
until a new slot is
selected,UTC hour
and minute follows
15:17 01111: 0010001
*UTC- Co-ordinated Universal Time
So I will be combining all the bits together after this.
000001 ---> 1
100000 ---> P
000000 ---> 0
000000 ---> 0
000000 ---> 0
011111 ---> O
110000 ---> h
000001 ---> 1
011001 ---> I
100100 ---> T
000001 ---> 1
111011 ---> s
111110 ---> v
100100 ---> T
100000 ---> P
000010 ---> 2
111010 ---> r
001010 ---> :
000100 ---> 4
000011 ---> 3
101111 ---> g
111010 ---> r
111111 ---> w
101010 ---> b
000000 ---> 0
010101 ---> E
111001 ---> q
000100 ---> 4
The final output should be : 1P000Oh1IT1svTP2r:43grwb0Eq4
I realised why the output does not follow 6 bit ascii table, this is
because
Decimal 0 of 6bit table is tied to Decimal 48 of Standard ascii (which the
character is 0) and so on and so forth. meaning, first decimal of 6bit
table
is tied to 48th decimal of standard ascii from Decimal 0 to 63 of 6bit to
Decimal 48 to 77 of standard ascii. This is to reproduced the desired
output
characters I need from the standard ascii table.
Is it clearer now? Thank you all, for your time.
Yes, the part you posted is much clearer. Now, one final question... what
part of the process do you need help with? Do you already know how to
created the binary values from those given? If not, then this may be a
problem because the conversions are not readily recognizable. For example,
in input #7, you show 61.2 being converted to 1001100100, but that is the
conversion for 612 (no decimal point). The same is true for items #11 which
looks like your numbers assume a single decimal point; however, in item #6,
the value of 1.1 is converted 101 which is not 11 (it is 5) and item #12
converts 351 to 101011111 which is correct for 351 but not for an assumption
of no decimal point. In addition, I don't see the rule for converting
bearing type numbers (items #9 and #10). So, it this is the part of the
problem you need help with, you are going to have to provide details of the
specification for all number conversions. However, if you already know how
to do this part, then it looks like you already know how to do the other
conversion (unless I misread your explanation). Anyway, the remaining
question I have is what do you need help with?
Rick
.
- Follow-Ups:
- Re: How do i change numerics into binary numbers?
- From: Howk013
- Re: How do i change numerics into binary numbers?
- References:
- Re: How do i change numerics into binary numbers?
- From: Rick Rothstein \(MVP - VB\)
- Re: How do i change numerics into binary numbers?
- From: mayayana
- Re: How do i change numerics into binary numbers?
- From: Rick Rothstein \(MVP - VB\)
- Re: How do i change numerics into binary numbers?
- From: Howk013
- Re: How do i change numerics into binary numbers?
- From: Larry Serflaten
- Re: How do i change numerics into binary numbers?
- From: Howk013
- Re: How do i change numerics into binary numbers?
- From: Larry Serflaten
- Re: How do i change numerics into binary numbers?
- From: Rick Rothstein \(MVP - VB\)
- Re: How do i change numerics into binary numbers?
- From: Howk013
- Re: How do i change numerics into binary numbers?
- Prev by Date: Re: Visual Basic/Access Database - I'm a Little Stuck....
- Next by Date: Re: Visual Basic/Access Database - I'm a Little Stuck....
- Previous by thread: Re: How do i change numerics into binary numbers?
- Next by thread: Re: How do i change numerics into binary numbers?
- Index(es):
Relevant Pages
|
Loading