**want to join two binary numbers**Suppose
$a=11
I want to make it 0011
If i will do like
$res="0000" | "$a" ;
this will come as 1100
But i want to make it 0011
How can i do this?
hara wrote:
> Suppose
> $a=11
> I want to make it 0011
> If i will do like
> $res="0000" | "$a" ;
> this will come as 1100
> But i want to make it 0011
> How can i do this?
>
You have already asked a very similar question in another thread here.
Please don't start multiple threads for your question.
Please read the posting guidelines for this group, which are posted here
reg...

**Algorithm to compare two binary numbers**Hi All:
I'm looking for an extremely fast algorithm that will compare 2
integers, and return the number of bit differences between them.
Specifically,
217 = 11011010
153 = 10011010
(only 1 bit differs, even though the numerical difference is large)
127 = 01111111
128 = 10000000
(7 bits differ, even though the numerical difference is small)
Examples:
f(217, 153) = 1 bit
f(127, 128) = 7 bits
f(255, 0) = 8 bits
Thanks.
* No Such Luck:
>
> I'm looking for an extremely fast algorithm that will compare 2
> integers, and return the number of bit differences between them.
>...

**How to add two binary numbers using bitwise AND**I like to know how to add two binaary numbers using bitwise AND
something like that:
$bin_1 = 1011101000001
$bin_2 = 1000101010101
$result = 1000101000001
basically user enter two decimal numbers and code change those numbers
to binary then using bitwise prints the value/result the convert the
value to hex numbers.
Thanks in advance..
On Thu, 15 Nov 2007 15:45:28 -0800, cyrusgreats wrote:
> I like to know how to add two binaary numbers using bitwise AND
> something like that:
> $bin_1 = 1011101000001
> $bin_2 = 1000101010101
> $result = 1000101000001
That's not a...

**Numbering in Access between two numbers**I have a question that I'm hoping someone here can answer. Let's say I
have two fields which have a beginning number and an ending number.
What I'd like to do is have Access generate a list of numbers between
the beginning number and the ending number (inclusive) for each row
that exists in my start table. For example, my start table might look
like:
Begin End
513525 513528
513530 513538
I would want my end table to look like:
NPA-NXX
513525
513526
513527
513528
513530
513531
513532
513533
513534
513535
513536
513537
513538
We are trying to build a list of NPA-NXXs ...

**(8-bit binary to two digit bcd) or (8-bit binary to two digit seven segment)**how do i write a code for (8-bit binary to two digit bcd) or (8-bit binary
to two digit seven segment)??
thanks.
"Fangs" <super_fangs@hotmail.com> wrote in message
news:8997c11eccbf1ba0d808d3d8d9ea1a8c@localhost.talkaboutprogramming.com...
> how do i write a code for (8-bit binary to two digit bcd) or (8-bit binary
> to two digit seven segment)??
The structural way to do this is to convert the 8 bit binary to BCD fist,
then convert BCD to 7 segment.
The BCD to 7 segment is very easy to implement. It is just a ROM with BCD as
the input and seven segment as the output....

**How to generate random number between two numbers**I want to generate a randowm number between two numbers x and y i.e
int randomNoBetween(int x, int y);
Plz help
Is there any such function??
Sanchit wrote:
> I want to generate a randowm number between two numbers x and y i.e
>
> int randomNoBetween(int x, int y);
The (I guess) simplest way to get a random number in the interval [0, n)
(that is, 0 inclusive, n exclusive) is (if n is small enough) probably
(rand() % n), which will however slightly favor smaller numbers.
I can't tell if there's any "consensus" on whether to use this method or
some more expensi...

**joining two files paste or join**Hello,
I have to files (csv) that I need to make into 1 file, but I am having
issues with paste.
Here is what I have,
file1,
DE,011,DAILY
,, VALID
,, OVER
file2,
NQ,PS,CZ
,,EM
,,HU
I need to end up with the file like so:
DE,011,DAILY,NQ,PS,CZ
,, VALID,,EM
,, OVER,,HU
I have messed around with paste using different delimiters, but cannot
get the desired result. Was hoping if someone could point me in the
right direction on this one.
Thanks
Pete.
On 2009-06-12, peter sands <peter_sands@techemail.com> wrote:
> Hello,
> I have to files (csv) that I need to make into 1 file,...

**How do you convert a hexadecimal number to a binary number?**I can't find a clue how to convert a hexadecimal number to a binary
number. Anyone know?
--
Posted via http://www.ruby-forum.com/.
[Note: parts of this message were removed to make it a legal post.]
number.to_s(2)
2008/5/30, Bob Sanders <small.business.strategy@gmail.com>:
>
> I can't find a clue how to convert a hexadecimal number to a binary
> number. Anyone know?
>
> --
> Posted via http://www.ruby-forum.com/.
>
>
From: "Bob Sanders" <small.business.strategy@gmail.com>
>
>I can't find a clue how to convert a hexadecima...

**the number 1 that is most right of binary number**Hello newsgroup,
In some of my work , I am dealing with binary numbers.
Dec Binary
----- -------------------
1 1 0 0 0
2 0 1 0 0
3 1 1 0 0
4 0 0 1 0
5 1 0 1 0
6 0 1 1 0
7 1 1 1 0
8 0 0 0 1
9 1 0 0 1
10 0 1 0 1
After converting a decimal number to its binary form using the "de2bi" function, for each digit, I need to find the posit...

**Convert decimal number in binary number**Hello,
is there a function in vhdl to convert a decimal in to a BCD? Or have I to
do this manual ? And if this is the only way, how can I do this?
Martin
makok wrote:
> Hello,
>
> is there a function in vhdl to convert a decimal in to a BCD? Or have I to
> do this manual ? And if this is the only way, how can I do this?
This might work. I haven't looked at it, I just googled for 2 secs, but
it looks like it's what you want.
http://www.vhdl-online.de/model_lib_patras/vhdl_sources/special/special.htm#bin_bcdN
-- Anders
...

**converting binary numbers to real numbers**Please tell me how to convert binary numbers to real numbers. How to
do the programme?
Thank you.
In article <ef0e4d4.-1@webx.raydaftYaTP>, "malar nayana"
<mv_nayana@yahoo.com> wrote:
> Please tell me how to convert binary numbers to real numbers. How to
> do the programme?
>
> Thank you.
-------------------------
What form are your binary numbers in? Strings, vectors of 1's and 0's,
what? Do they represent integers, or if not what determines their binary
points?
(Remove "xyzzy" and ".invalid" to send me email.)
Roger Staffor...

**Joining two tables on two fields**Hello all,
I am joining two tables in a query and the output should be all those
records where two fields in table1 match two corresponding fields in
table2.
I joined the tables using both fields in design view and the Select
statement in SQL view looks good. The query runs perfectly and shows
the result I want but when I save the query and close it, re-opening in
design view shows the error message "Microsoft Office Access can't
represent the join expression {Table1].[Fieldx] = [Table2].[Fieldx] in
design view." This is okay as long as it does not affect the query but
when I r...

**How to join two COUNT results from two tables**Hi
I have an email campagin system
while sending each mails i am recording it with current timestamp
sample data
number email tim_stmp
1 cxcx@yahoo.com 2008-12-25 13:34:38
2 fggg@yahoo.com 2008-12-26 13:37:30
3 ccx@yahoo.com 2008-12-26 13:34:38
4 abc@yahoo.com 2008-12-29 12:18:15
5 ddd@yahoo.com 2008-12-29 12:01:18
When i get responses i am tracking those too
number eml_id cur_time
1 1 2008-12-27 20:45:10
2 3 2008-12-27 22:18:15
3 2 2008-12-29 18:14:18
4 4 2008-12-29 20:52:05
Now Am trying to make a report that prints a daily status from those
tables
and i need the results...

**How do I get a random number between two random numbers?**I want to create a program that asks you to guess a number between two
numbers. The problem is that I can't figure out how to make the numbers
that you're guessing between random and have the random number you are
guessing between those two numbers. Does anybody know how to do this?
--
Posted via http://www.ruby-forum.com/.
Alex Untitled wrote:
> I want to create a program that asks you to guess a number between two
> numbers. The problem is that I can't figure out how to make the numbers
> that you're guessing between random and have the random number you are
> ...

**joining two tables, but then comparing the join fields with NOT...**I have two tables... One that lists the loan officer's information and
one that lists all the people who have statement of accountabilites
filed for them. Right now I have them joined on the loan officers
name. Problem is, I need to select all the loan officers from the loan
officer table who are not listed in the statement of accountability
table.
The current query I have for this is:
SELECT LoanOfficers.Name, LoanOfficers.HireDate,
LoanOfficers.Inactive, LoanOfficers.[SS#], LoanOfficers.Payment,
LoanOfficers.State
FROM LoanOfficers
WHERE (((LoanOfficers.Name)<>[StatementOfAccounta...

**Generating unique number from two other unique numbers**I would like to generate a unique number from two other unique
numbers.
With the two input numbers, one is a customer ID number (e.g. 23 =
"John Kerry", 97 = "George Bush" etc.) and the other number is a
promotion ID (e.g. 5 = "October two-for-one sale", 8 = "Summer free
shipping promotion" etc.)
The two input numbers are NOT unique against themselves i.e. I could
have a customer # 23 redeeming promotion # 23. They are only unique
amongst themselves.
The end goal is that from a generated number I am able to decode back
the customer ID and promotion ID...

**how two join and arrange two files together**
Hi,
I have two files having entries like:--
fileA
8 ALA H = 7.85 N = 123.95 CA = 54.67 HA = 2.98 C = 179.39
15 ALA H = 8.05 N = 119.31 CA = 52.18 HA = 4.52 C = 177.18
23 ALA H = 8.78 N = 120.16 CA = 55.84 HA = 4.14 C = 179.93
and
fileB
ChainA: ALA8 -67.217297 -37.131330
ChainA: ALA21 -69.822977 -48.871282
ChainA: ALA23 -59.148095 -46.540043
ChainA: ALA33 -65.459303 -43.269718
i want to join thses two files in such a way that the output file will
contain column of both the files and the enties of similar position of ALA
will be together.so the output file should look something like:----
fil...

**join two tables with sharing some columns between two**Hi,
I have two tables like these: (this is an example, the actual tables
have diffferent fields and meanings)
TABLE1
id
person_name
date_arrival
date_departure
TABLE2
id
car_description
date_arrival
date_departure
I'd like to make a query to have such resulting table
RESULTING_TABLE
id
person_name
car_description
date_arrival
date_departure
the id is the primary key for the three tables and it's unique for the
three (id in table1 cannot be in table2, I use the same counter to
generate the id for table1 and table2).
I is possible to create such a query?
Thanks
filippo ...

**join two tables with sharing some columns between two**Hi,
I have two tables like these: (this is an example, the actual tables
have diffferent fields and meanings)
TABLE1
id
person_name
date_arrival
date_departure
TABLE2
id
car_description
date_arrival
date_departure
I'd like to make a query to have such resulting table
RESULTING_TABLE
id
person_name
car_description
date_arrival
date_departure
the id is the primary key for the three tables and it's unique for the
three (id in table1 cannot be in table2, I use the same counter to
generate the id for table1 and table2).
I is possible to create such a q...

**How can I convert a Hex number to a binary number?**Hi,
I am using the following function for decimal numbers but I have a neeed to
convert hex to binary.
Public Function Binary(Number As Long) As String
If Abs(Number) > 1 Then
Binary = Binary(Number \ 2) & CStr(Abs(Number Mod 2))
Else
Binary = CStr(Number)
End If
End Function
thanks
Kirk
> I am using the following function for decimal numbers but I have a
neeed to
> convert hex to binary.
>
> Public Function Binary(Number As Long) As String
> If Abs(Number) > 1 Then
> Binary = Binary(Number \ 2) & CStr(Abs(N...

**How to find the closest two numbers between two sets of data?**How to find the closest two numbers between two sets of data? Say two
vectors A and B, how to find a (from A) and b (from B) so that
abs(a-b) is the smallest among all?
I could do this by a simple (stupid) thorough search, is there a
better way in Matlab?
Thanks,
Jim
Jim River wrote:
>
>
> How to find the closest two numbers between two sets of data? Say
> two
> vectors A and B, how to find a (from A) and b (from B) so that
> abs(a-b) is the smallest among all?
>
> I could do this by a simple (stupid) thorough search, is there a
> better way in Matlab?
&g...

**binary number loop**All,
A co-worker of mine is working on a program using a financial model that
has some binary tree type logic (sorry - don't know much more about than
that) where she will know how many "levels" she has - say 3 - and then
needs to generate all binary numbers from 000 to 111 - and the process
will do some calculations for each one. She was originally trying a
multistage loop where she set the first digit, then looped through 0 and 1
to set the 2nd, etc. but it was very inefficient plus gets more and more
complicated the greater the number of "levels" the tree will bran...

**Counting number of numbers in a large list between two valus**Dear Listers,
I have a large (5-20million) one dimensional list of real numbers and
I want to count the number of entries in the list that lie between 2
specific values (x1, x2). I need to run the function for a number of
different ranges.
ie. number of list entries (l), where x1 <= l <= x2
I've tried:
tallydata[{x1_, x2_}] := Count[data, x_ /; x1 <= x <= x2]
that takes about 3-4 seconds
and
tallydata[{x1_, x2_}] := Length[Select[data, x1 <= # <= x2 &]]
which takes a little bit longer.
The best I've managed is (this last one might be ...

**Enumerating all possible binary numbers from given number of columns**Hi,
does anyone have code that will enumerate all of the binary numbers possible
from a user specified number of columns?
e.g. if No of Columns = 2
Output =
00
10
01
11
any help appreciated
L
La di da Limey wrote:
>
>
> Hi,
>
> does anyone have code that will enumerate all of the binary numbers
> possible
> from a user specified number of columns?
>
> e.g. if No of Columns = 2
>
> Output =
> 00
> 10
> 01
> 11
>
> any help appreciated
>
limeys need help with simple homework? you can figure out how to get
the input to the formula: ...