[mso] Re: Convert ones & zeros to binary, and get decimal?
- From: "Jim Pettit" <j_e_pettit@xxxxxxxxxxx>
- To: <mso@xxxxxxxxxxxxx>
- Date: Wed, 28 Jul 2004 13:43:17 -0700
Robert--
You;ll most likely need to call a separate function. Try this one:
Function Bin2Dec(sBinaryIn as String) As Long
Dim hWork As Long
Dim iLoop As Integer
For iLoop =3D 1 To Len(sBinaryIn)
hWork =3D hWork + (Mid(sBinaryIn, Len(sBinaryIn) - iLoop + 1,
1) * (2 ^ (iLoop - 1)))
Next iLoop
Bin2Dec =3D hWork
End Function
--Jim
-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On =
Behalf
Of Robert Carneal
Sent: Wednesday, July 28, 2004 1:35 PM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Convert ones & zeros to binary, and get decimal?
Suppose:
A1 =3D 1
B1 =3D 0
C1 =3D 1
D1 =3D 0
Can I combine somehow to get 1010 (binary), and convert to decimal to =
result
in a display of 10 (ten, in decimal)?=20
Thank you.
Robert
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx =
or
MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, send an email to=20
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the =
quotes)
in the subject line.
Or, visit the group's homepage and use the dropdown menu. This will =
also
allow you to change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to use the files section for sharing files with the group, =
send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an =
invitation
with instructions. Once you are a member of the files group, you can go
here to upload/download files: http://www.smartgroups.com/vault/msofiles
*************************************************************
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, send an email to
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in
the subject line.
Or, visit the group's homepage and use the dropdown menu. This will also allow
you to change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with
instructions. Once you are a member of the files group, you can go here to
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************
- Follow-Ups:
- [mso] Fao: Jim Pettit - Outlook configuration
- From: Andrew
- References:
- [mso] Convert ones & zeros to binary, and get decimal?
- From: Robert Carneal
Other related posts:
- » [mso] Convert ones & zeros to binary, and get decimal?
- » [mso] Re: Convert ones & zeros to binary, and get decimal?
- » [mso] Re: Convert ones & zeros to binary, and get decimal?
- [mso] Fao: Jim Pettit - Outlook configuration
- From: Andrew
- [mso] Convert ones & zeros to binary, and get decimal?
- From: Robert Carneal