Bits are not matching

i was reading a post of DrLaszloJamf.....
link http://forum.java.sun.com/thread.jspa?threadID=656462&tstart=90
what is "0x96" ?..this is in the HEX notation. in decimal value it is 150.
i run this code....
public class U {
    public static void main(String[] args) {
        f((byte)0x96);
    static void f(byte b) {
        for(int i=0; i<8; ++i) {
            int bit = 1 & b>>i;
            System.out.println("bit " + i + " = " + bit);
}and got output....
---------- Run java ----------
bit 0 = 0
bit 1 = 1
bit 2 = 1
bit 3 = 0
bit 4 = 1
bit 5 = 0
bit 6 = 0
bit 7 = 1
Output completed (0 sec consumed) - Normal Termination
then i manually calculated taking these bits like this
2^6+2^5+2^3+2^0=105
buit the result should have been 150..is not it ? why the math and program output did not coincide ? it should have matched .

Something's wrong with your math
2^7 + 2^4 + 2^2 + 2^1 = 150
bit 0 = 0
bit 1 = 1 = 2
bit 2 = 1 = 4
bit 3 = 0
bit 4 = 1 = 16
bit 5 = 0
bit 6 = 0
bit 7 = 1 = 128             ------
                150

Similar Messages

  • SQL Query to find Receipt No.s which are not matched to AP Invoices

    Hi
    Please help me to frame a query to find list of Receipt No.s which are not matched with AP Invoices.
    Please refer to the below query .
    SELECT
    poh.segment1 "PO No.",
    aps.vendor_name "Supplier Name",
    pol.item_description "Item Description",
    rcvh.receipt_num "GRV No.s",
    rcvl.quantity_received "Quantity",
    pol.unit_price "Rate/Unit",
    rcvtl.tax_name||' - '||initcap(rcvtl.tax_type) "Tax",
    (rcvl.quantity_received * pol.unit_price) + nvl(rcvtl.tax_amount,0) "Amount"
    FROM
    po_headers_all poh,
    po_lines_all pol,
    po_distributions_all pod,
    ap_suppliers aps,
    rcv_shipment_headers rcvh,
    rcv_shipment_lines rcvl,
    rcv_transactions rcvt,
    jai_rcv_line_taxes rcvtl
    WHERE
    poh.po_header_id = pol.po_header_id
    AND poh.po_header_id = pod.po_header_id
    AND pol.po_line_id = pod.po_line_id
    AND aps.vendor_id = poh.vendor_id
    AND aps.vendor_id = rcvh.vendor_id
    AND rcvh.shipment_header_id = rcvl.shipment_header_id
    AND poh.po_header_id = rcvl.po_header_id
    AND pol.po_line_id = rcvl.po_line_id
    AND rcvh.shipment_header_id = rcvt.shipment_header_id
    AND rcvl.shipment_line_id = rcvt.shipment_line_id
    AND poh.po_header_id = rcvt.po_header_id
    AND pol.po_line_id = rcvt.po_line_id
    AND aps.vendor_id = rcvt.vendor_id
    AND rcvh.shipment_header_id = rcvtl.shipment_header_id
    AND rcvl.shipment_line_id = rcvtl.shipment_line_id
    AND rcvt.transaction_id = rcvtl.transaction_id
    AND aps.vendor_id = rcvtl.vendor_id
    AND rcvt.transaction_type = 'RECEIVE'
    AND poh.authorization_status = 'APPROVED'
    AND poh.segment1 = '210001079'
    I have'nt included the Invoice Tables in the above query.
    Please help me in that area.
    This is bit urgent.
    Please help me.
    Regards
    Nakul Venkatraman

    I am using ORACLE 11gR2 If you're licensed for Diangnostics pack then you might want to look at the AWR tables, e.g. DBA_HIST_SQLSTAT and cross-reference with DBA_HIST_SNAPSHOT.
    By this will i get the top 5 consumed queries of DEV user in the whole session or its just the top 5 queries at that particular time. The "executions" columns in this query, does it mean that the no. of. times the query has executed... This will get you a random 5 queries that were first parsed by DEV. Depending on your application code/structure, it may well be that all code (except for system-recursive sql) executed by DEV is parsed by DEV, and all code parsed by DEV is executed by DEV but this isn't true for all.
    In terms of top N queries, you need to ORDER BY and then restrict by ROWNUM at an outer level to the ROWNUM otherwise the ROWNUM filter is applied before the ORDER BY.
    i.e.
    SELECT *
    FROM
    (SELECT ...
    FROM ...
    WHERE
    ORDER BY...)
    WHERE ROWNUM <= ....
    The "executions" columns in this query, does it mean that the no. of. times the query has executedYes.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e25513/dynviews_3064.htm#REFRN30259
    Edited by: Dom Brooks on Oct 24, 2011 9:45 AM

  • Open Item and Line Items are not matching

    Hi Gurus,
    I ran the EFT for vendor #1600109 for payment on 10/18/07.  If I run the vendor open items report (ZFI019) for today, it shows the balance net of the EFT that is $203,466 ( $263869 - EFT Value is $60,403). 
    When I ran the vendor line items display (FBL1N), it shows all the invoices including the invoices paid on the Oct 18 EFT $263,869 which is (2034,66+60,403). 
    User wants the open item report should tally the line item display.
    I will assign good points.
    Thanks for your help
    Prashanth

    Hi Gurus,
    EFT is working fine. But the Vendor Open item Report (Custom Report) and Vendor line item report (FBL1N) is different.
    We are looking a balance for a vendor as on 15th where the balances are not matching between the reports but if i run FBL1N on 18th the balances are matching.
    Clearning date is 18th
    Posting Date is 15th.
    Thanks
    Prashanth

  • ETD and Base line are not matching

    Hi All,
    My requirement is in production server, for some invoices the Expected time departure and base line date are not matching,
    What will be the reason behind this? Can you please advice how to approach to this problem.?
    Thanks in advance
    jaya.G

    Hi,
    could you please eloborate the issue?
    Thanks,
    Srinu

  • FD10N and FBL5N Reports are not matching

    Hi,
    When i execute FD10N FBL5N reports for customer balance, Both are showing different balances, why they are not matching with each other?
    My FBL5N open item blance is not matching with FD10N.what could be the reason?
    Is there any other report to show customer opening balances other than FD10N?
    thaanks

    Dear Dogdays
    This is selection parameters problems- means please check once again what you selected check boxes  and also check for Dates what you given
    To check both the above cases, FD10N for the year you see the difference. Double click on the balance value for the period where you have seen the difference. The double click will call FBL5N for the period and customer. If the total of the line item report matches the balance in FD10N, then the issue is selection criteria
    Regards
    shankar

  • OBIEE 11g Report-When drilling down to lower level, totals are not matching

    Hi All,
    I am creating a report in Analytics 7.9.6.3 , OBIEE 11g - Let’s say Budget Cost/Actual Cost based on the Date Dimension
    Have selected the Fiscal Year Dim, Fact Budget Cost, Fact Actual Cost
    FY BCost ACost
    2011 100 120
    2012 150 140
    Total 250 260
    But here when I am drilling down from Year to Quarter and Period - The values are not matching with the totals....
    FY FY Qrt BCost ACost
    2011 2011 Q1 80 100
    2011 Q2 100 90
    2011 Q3 110 120
    2011 Q4 90 130
    Total 380 440
    Fiscal Year, Fiscal Quarter Budget Cost and Actual Cost are not returning correct results – When selecting cost's by fiscal year, or filtering on a specific fiscal year, the amount returned does not equal the fiscal year total;
    when I am drilling down to Quarter and Period Level the BCost & ACosts are bumping the Numbers as above and not matching with totals
    Any suggestions?

    Check out the query in both the times.Execute against database and try to sum the data for quarter/period and compare it with Year data.
    Just try to differentiate is it a report total that is getting wrong or the data in the database table itself is getting wrong stored.
    Mark as helpful if it helps.
    Regards,
    Veeresh Rayan

  • When drilling to lower level - Totals are not matching in BI Analytics OOB

    Hi All,
    I am creating a report in Analytics 7.9.6.3 , OBIEE 11g - Let’s say Budget Cost/Actual Cost based on the Date Dimension
    Have selected the Fiscal Year Dim, Fact Budget Cost, Fact Actual Cost
    FY BCost ACost
    2011 100 120
    2012 150 140
    Total 250 260
    But here when I am drilling down from Year to Quarter and Period - The values are not matching with the totals....
    FY FY Qrt BCost ACost
    2011 2011 Q1 80 100
    2011 Q2 100 90
    2011 Q3 110 120
    2011 Q4 90 130
    Total 380 440
    Fiscal Year, Fiscal Quarter Budget Cost and Actual Cost are not returning correct results – When selecting cost's by fiscal year, or filtering on a specific fiscal year, the amount returned does not equal the fiscal year total;
    when I am drilling down to Quarter and Period Level the BCost & ACosts are bumping the Numbers as above and not matching with totals
    Any suggestions?

    Check out the query in both the times.Execute against database and try to sum the data for quarter/period and compare it with Year data.
    Just try to differentiate is it a report total that is getting wrong or the data in the database table itself is getting wrong stored.
    Mark as helpful if it helps.
    Regards,
    Veeresh Rayan

  • In 27q form Amount deducted and amount payable are not matching

    Dear All
    Here we made a z programm for form 24 qa as zf24q.But what is happening means in the excell the Amount Tax deducted and Tax deposited is showing correctly but in display these two amounts are not matching.so kindly give any suggestion for me
    Regards
    lakshman

    not answered yet.

  • How can it that half of my songs are matched in iTunes Match where the other songs from the same CD (ripped by Itunes) are not matched but uploaded?

    I started with ITunes Match a few days ago (I have the latest versions of all OS's etc)
    - The whole process took more then two days to complete for the first time.
    - Half of my songs are matched in iTunes Match where the other songs most of the time from the same CD (most ripped by ITunes) are not matched but uploaded(?)
    - Complete CD's are not recognized, they are however available in the ITunes store (songs in my library not available in ITunes are an exception).
    - The match part overall is less then 50%, which is a complete disappointment.....
    - When I activate ITunes Match on my IPod, IPhone and IPad the art-work does not load or only partly.
    - Loading songs on iOS is extremely slow... and that is definitely not due to my internal network.
    - ICloud (ITunes Match) on the apple TV stops working after every 15 seconds because it losses connection to the ITunes server....
    I am a real Apple fan for the last decade but what a disappointment is this......before I started with ITunes Match everything worked seamlessly.

    The number of Songs that 'matched' is simply a function of the current iTunes Match service process.  It is not unusual to have multiple Songs in an otherwise perfectly matched album be uploaded - often it is very possible to find the album in the iTunes Store.
    The Artwork does tend to reappear for many over a few days / weeks - however, if your library backup has all Artwork present it would be wise to save the Album Art separately and reapply to Albums not showing art work in the library grid view.
    Many of the other performance issues you mention are not typical - though during the past working week or so the Apple Infrastructure has been very heavily loaded with multiples countries having service go-live symultaneously.

  • How can i fix a clip when the video and audio are not matching up?

    How can i fix a clip when the video and audio are not matching up? I imported the video from a junkdrive in a .VOB format and concerted to a .mov the videos were filmed on a miniDVD recorder.

    I would try detaching the audio and the dragging the audio to the left or right until it lines up.

  • HT204406 The songs on my computer itunes playlist and my iphone playlist songs are not matching up. I do see new songs I've added on my computer playlist on my iphone playlist but the songs are not in the same order. How do I get them to match?

    Playlists matching on computer and iphone?  The playlists on my computer in itunes are not matching up with the "match" playlist on my iphone.  New songs do show up when I add them to a playlist, but the songs are all in different order.  If I edit a playlist on my computer how do I get it to match on my iphone?

    Restore them to the new computer using the bakcup of the old one. If you don't have a backup of the old computer, you can re-download music purchased from the iTunes store. If they were imported from CD's, etc. You will either have to re-rip them or purchase third party software to extract them from the phone. The iPhone is not a backup or data transfer device.

  • Asset Balances Are Not Matching with General Ledger

    HI,
    After Doing asset year ending,balance carry  forward,,,the Asset balances are not matching with the General ledger.what is the reason?
    Kindly help me in this regard...it is very urgent.
    Thanks
    Sap Guru

    Please run ABST2 for the relevant company code to reconcile FI and AA.
    then check this out through ABST.
    Regards
    Velumani

  • Fund center reports Assigned values are not matching with ledger balances.

    Thanks for your Support. We have activated funds management in May-2009. And deactivated one or two times. Now the status is active.
    Now we are taking reports the assigned values are not matching with gl ledger balances.
    1. We need to update records for April- May.
    2. Records in between deactivated and activate time.
    Please suggest updating fund centers and commitments.
    Regards

    hi ELI
    i have checked the follwoing secnarios
    1. funds management deactivated.
    2. one document posted  with amount10000
    3. funds management activated.
    4. we have executed FMN0
    here no document is selected after execution.
    Please suggest what are the activities we need to do if i am wrong...
    Regards

  • Reports of leading & non -leading ledgers are not matching

    Reports of leading & non-leading ledgers are not matching in the trial balance
    report from t.code S_PL0_86000030 . Both should be matched but not matching. Leading ledger report
    has been taken by giving the data (Currency:10, Company code: IN06,
    Ledger: 0L, Fiscal Year: 2008, From period:1, To period: 16)
    And non-leading ledger report has been taken by giving the data
    (Currency:10, Company code: IN06, Ledger: AI, Fiscal Year: 2008, From
    period:1, To period:9)
    And account codes are not same in both the reports. If one account codes
    is there in one report it is missing in other report.
    Balance sheet for the period from April 2008 to March 2009 has to be finalised based on the non-leading
    ledger report.
    1.Non-leading ledger is acitivated .Fiscal year activated Jan to Dec-K4 .IN this case  how can I enter the periods for  to view  leading ledger and non-leading leader reports and compare the reports.
    help to solve the issue.
    Regards
    dharmendar

    Hi,
    Thanks for your inputs. I have 2 queries here...
    1. Whether the reports S_ALR_87013542 & CN41 are same displaying the same information?
    2. How can I check the Balance amount still remaining in the project? Is there any report?
    Thanks & regards,
    Bala

  • Reports are not matching

    Hi,
    There is a reporting problem with one of our projects. We use reports S_ALR_87013542 (Display Actual Cost Line Items for Project) and CN41(Structure Overview). The balance being displayed by these two reports are not matching. Why the different amounts are showing up in these two reports and how do I find out the correct amount which still remains in the Project.
    Your suggestions/inputs will be highly appreciated.
    Regards,
    Bala

    Hi,
    Thanks for your inputs. I have 2 queries here...
    1. Whether the reports S_ALR_87013542 & CN41 are same displaying the same information?
    2. How can I check the Balance amount still remaining in the project? Is there any report?
    Thanks & regards,
    Bala

Maybe you are looking for

  • What is the safest way to learn whether or not my MacBookPro has fallen victim to DNSChanger?

    Hundreds of Thousands Losing the Internet in July? I didn't know if anyone else had heard about this, but the following article was recently published in the Denver Post.  Since the Denver Post usually checks this type of stuff out pretty thoroughly,

  • Audio ahead of video in iTunes using Windows 8

    I recently bought a new HP ENVY m4 laptop with Windows 8 at Best Buy. I do not like Windows 8, I prefer Windows 7, but there was nothing I could do about it. After I bought my new laptop, I downloaded iTunes along with everything I have ever bought o

  • SAP ABAP (AFS) Developer-Bristol,PA-6 Mons Contract

    Hi, We are looking for an experienced SAP ABAP Developer to work in an Apparel and Footwear business solution (AFS) implementation. Job Title: SAP ABAP Developer Location: Bristol, PA Pay rate: Open Length: 6 Months Requirements: - Must have AFS (App

  • How to get import on to iphone

    I imported a cd to my macbook air and wanted it to be available on the cloud so I can have it on my iphone.

  • K7n420 which memory slots?...

    Hi, I am a bit confused. Till now i knew that after bios v2.2 and above the best combination for Dual DDR operation in the k7n420 (nforce) was 2 sticks of memory put in slots 1&2. Recently, i have learned from lowrider that he is getting the best res