Left shift with fill zero...

hi group,
We can apply ~ to int variable also.
can u tell me what is the output of y?
int x = -1;
int y = ~x + 1;
and as well as tell me what is the output of this stmts?
int a = -1;
a = a >>> 24;
b'coz i know how to apply the bit representation of byte variable.
but i don;t understand what is happening with letf shift fill zero variable in the second stmts
can u ppl help me regarding this tricky stmts??
thank u
shalini.

We can apply ~ to int variable also.
can u tell me what is the output of y?
int x = -1;
int y = ~x + 1;
y is 1.
and as well as tell me what is the output of this
stmts?
int a = -1;
a = a >>> 24;
a is 255.
b'coz i know how to apply the bit representation of
byte variable.
but i don;t understand what is happening with letf
shift fill zero variable in the second stmts>
The top bits are filled with zero (whereas with ">>" they would get the value of the sign bit) when shifting: 11001 >>> 1 is 01100 when 11001 >>> 1 would be 11100. Very simple.

Similar Messages

  • Matrix Report with Fill Zero

    Hello ,
    I created a matrix report , Outer join is using in query ,so couldn't fill "0" to blank ammount column , please help me
    Query is :-
    SELECT
    nvl(AAMT,0) AAMT,
    nvl(AHRS,0) AHRS,
    JOBNUM JOBNO,
    B.USERCCM,
    B.CCMNAME
    FROM
    (SELECT SUM(ACTAMT) AAMT,
    SUM(ACTHRS) AHRS,
    JOBNUM,
    CCM,
    DEPTCODE FROM
    (SELECT SUM( ACTAMT) ACTAMT,
    SUM(ACTHRS) ACTHRS,
    JOBNUM,
    CCM,
    DEPTCODE
    FROM CSBUDTIM
    WHERE DEPTCODE=:DEPTCOD AND
    JOBNUM BETWEEN :JOBNUM AND :JOBNUM1 AND
    TRDATE BETWEEN :FROMDATE AND :TODATE
    GROUP BY JOBNUM,CCM,DEPTCODE
    UNION ALL
    SELECT SUM( ACTAMT) ACTAMT,
    SUM(ACTHRS) ACTHRS,
    JOBNUM,
    CCM,
    DEPTCODE
    FROM CSBUDETM
    WHERE DEPTCODE=:DEPTCOD AND
    JOBNUM BETWEEN :JOBNUM AND :JOBNUM1 AND
    TRDATE BETWEEN :FROMDATE AND :TODATE
    GROUP BY JOBNUM,CCM,DEPTCODE
    UNION ALL
    SELECT SUM(ACTAMT) ACTAMT,
    0 ACTHRS,
    JOBNUM,
    NVL(CCM,'DM') CCM,
    DEPTCODE
    FROM CSBUDMAT
    WHERE DEPTCODE=:DEPTCOD AND
    JOBNUM BETWEEN :JOBNUM AND :JOBNUM1 AND
    TRDATE BETWEEN :FROMDATE AND :TODATE
    GROUP BY JOBNUM,CCM,DEPTCODE)
    GROUP BY JOBNUM,CCM,DEPTCODE) A ,
    CSPGMCCM B
    WHERE B.DEPTCODE = A.DEPTCODE(+) AND
    B.USERCCM = A.CCM(+) and
    B.DEPTCODE = :DEPTCOD
    ORDER BY A.JOBNUM,B.USERCCM
    --------------------------------------------------------------------------------

    Hay Thahir,
    Can u plz tell me the solution

  • Left Shift-I Non-Functional

    Strangest thing. Left Shift-I does not register, not even in Keyboard Viewer on an Intel iMac. Right Shift-I works, and left Shift with any other key works. Tried checking they keyboard mapping and all the suggestions in the Help. Rebooted. Running 10.6.8.
    Anything to try before an OS re-install?

    I think I found the issue.
    I opened the Keyboard Viewer and it looked like the down arrow key was stuck down, although mechanically it felt ok. I tapped it hard a few times and the screen showed it was unstuck. After that, Shift-I is working.
    Very strange.

  • Left SHIFT key always truncated with OPTION key

    Every time I press down the left shift key the option key also gets activated. For instance, leftshifta=Å, leftshiftq=Œ and so forth. I noticed that when I went through the initial setup and confirmed with the keyboard viewer. How can I get this fixed without taking the computer back?

    Welcome to Apple Discussions
    You can't fix this yourself you'll have to take it back to Apple and have them replace the keyboard.

  • Left shift issue with certain keys.

    Hello,
    From today, I have noticed an issue when using the right shift button, 
    It seems to only work with certain keys, the ones I have noticed do not work are ?  and :
    these works ok when using Left Shift
    Right shift works ok for other keys.

    Hi,
    Thanks for the reply, I dont have one with me at present,
    I find it strange, as I would normally agree with you but...
    The shift key works ok when used with other buttons indicating the shift key is ok.
    the ? and the : button work ok when no shift modifyer is present or when the shift key on the left hand side is used.
    proving both bottons work just not when used together

  • I cannot get the i to work when i try to capitaliize with the left shift key

    When i try to use the i key and the left shift, nothing appears-so to use the first person "I"  i need to use the right shift.  This started after i had had my computer for about 3 weeks.-what gives? is it a setting, or do  i need a new keyboard?

    Open the Speech pane of System Preferences and check whether either the listening key or the speech key has become set to that keystroke; if so, change the setting.
    (59274)

  • Left-shift operator used on byte values

    Hello,
    I'm reviewing some problems, and I need some help. I have a program that has some code like the following:
    byte y = 10; // 00001010 in binary
    byte result = (byte) (y << 1);
    System.out.println("result: " + result); // 20.  Ok.
    result = (byte) (y << 7);
    System.out.println("result: " + result); // 0.  Ok.
    result = (byte) (y << 8);
    System.out.println("result: " + result); // 0. Why???
    // I was expecting a shift of 0 bits because the
    // right-hand operand is equal to the number of
    // bits for the size of the result type--in this case
    // 8 bits for a byte.
    // 8 % 8 = 0 number of bits for the shift.
    result = (byte) (y << 6);
    System.out.println("result: " + result); // -128.  Ok.
    result = (byte) (y << 10);
    System.out.println("result: " + result); // 0.  Why???
    // Shouldn't it be 2 bits for the shift?
    // That is, 10 % 8 = 2.
    // I was expecting 40 as the the answer for this one.I understand that for binary operations that the operands will be promoted to at least int types before execution occurs, but I still don't see how it would make a difference for the left-shift operator. Any help and clarification on this will be appreciated. It would be helpful to see the binary representation of the the "result" variable for the ones that I'm asking about. Thanks in advance.

    result = (byte) (y << 8);
    System.out.println("result: " + result); // 0. Why???
    // I was expecting a shift of 0 bits because the
    // right-hand operand is equal to the number of
    // bits for the size of the result type--in this case
    // 8 bits for a byte.the result of (y << 8) is an int, not a byte. the byte "y" is promoted to int for the bit shift. so the int result of the bit shift is 00000000 00000000 00001010 00000000. when you cast that back to byte, the 24 leftmost bits get lopped off, and you're left with zero.
    hth,
    p

  • My left shift key on Macbook Pro Retina (15") is behaving like the F11 key (show/hide open windows).  The key behaves the same for the laptop keyboard and for an external Apple keyboard?  This just started in last week after 6 months of use

    My left shift key on Macbook Pro Retina (15") is behaving like the F11 key (show/hide open windows). 
    The left shift key behaves the same on the laptop keyboard and on an external Apple keyboard. 
    This just started in last week after 6 months of use.  The right shift key and other keys on the keyboard all appear to work correctly.
    Suggestions greatly appreciated.

    I have a solution to this issue now after a discussion with Apple Support.  Some where in the last few weeks, there was a change in the key that would do a Show Desktop under the Mission Control settings in the System Preferences.  Even though the key sequence that was shown for the Show Desktop setting did not include the Left SHift key, by changing this first to having no key sequence and applying that and then changing it back to the F11 key, the Left SHift key issue that I was having has cleared up.
    A second issue that was uncovered was that the SSD had some issues (uncovered when I ran Disk Utility using the Repair Disk key).  I had to restart and use the Disk Utility through the Command R sequence to get to the stand alone Disk Utility.  The SSD appears to be running better as a result as well.
    Hope that this is of use to someone else in the future.

  • How do I fix my left shift key? Any open windows leave and make the desktop visible.

    How do I fix my left shift key? Any open windows leave and make the desktop visible. I have tired to go into system preferences and reset all of the keyboard settings to default but the issue hasn't gone away.

    You are not running as administrator, I think, which may be required and the only way to properly work and register. Also check for compatibility mode settings, UAC and DEP, all of which may require to be adjusted for a legacy app like PS CS2 to run properly. Also turn off Aero and switch to a conventional visual theme. The brush issue may be related to that or is a more generic problem with your graphics card and mouse config, but since you didn't provide any info on that, it will be hard for anyone to advise.
    Mylenium

  • On my Cinema Display the screen is blurry and shifts with mouse movement.

    I have had this screen for a year and a half and only use it once a week in my remote office. This morning I noticed blurring on the screen and the whole screen shifts up/down, left/right with mouse movement. Please help. I am getting a headache.
    Thanks In Advance,
    Rob

    Press Command-Option-8 once or twice.
    You have Zoom on. It is controlled in "Seeing" in "Universal Access" system preference, and by Control-Scrollwheel.

  • Left shift key doesn't work on some characters

    In some applications, such as Excel and AOL, my left shift key doesn't work on some letters. Consequently, when I'm typing I get lower case letters when I've typed shift plus the letter to get a cap. Right shift works OK, but I'm not used to using it. It happens on i, t, and p, I've noticed so far. I don't know if it's the keyboard or the application. Word seems to work fine.
    Would welcome any ideas on what is causing this and how to fix it.
    Powermac G5   Mac OS X (10.4.7)  

    Is it possible that you have inadvertently switched to a different keyboard layout? Open System Preferences, then click on the Language & Text preferences. Within the Language & Text preferences click on the 'Input Sources'. You should see a long list of languages representing the various keyboard layouts that are available. Make sure that only the keyboard language you use is selected. If there are multiple languages selected then de-select the extras.
    If you continue to have problems then check the 'Show input menu in menu bar' checkbox in the lower section of the preference pane. This will place an icon in the upper right menu bar (it looks like a flag representing the language you have chosen for your input device) that provides additional options. I suggest selecing the 'Show Keyboard Viewer' option and then try pressing the keys that you are having problems with to see how they show up on the keyboard viewer graphic. If you've set the correct language for your keyboard and the key sequences still don't match, then you may need to take your keyboard in for service. Better yet, borrow another keyboard to confirm that the keyboard is the issue.

  • 3 letters + left shift key not working - 2 of them + right shift key working

    Hi all,
    as in subject, I have just bought a laptop g50-45, italian keyboard.
    I encountered this problem:
    "LEFT shift key" + "e" or "d" or "c" combinations do not work. Nothing happens.
    "RIGHT shift key" + "e" or "d" work properly
    "RIGHT shift key" + "c" do not work. Nothing happens
    CAPS key + "e" or "d" or "c" work properly.
    I noticed this issue before making any updates of  windows 8.1
    I tried making an update of the bios and later updating windows but the problem is still there.
    I check with an external keyboard and everything work correctly
    I don't think it could be a mechanical problem because "e", "d" and "c" keys alone work properly, so it seems more a software side problem.
    Thank you for your help.

    thanks, i thought there some quick procedure to do before heading to apple store. i was just wondering, it was working for a while, and then suddenly like that. i have macbook 10.6.8 software. intel core 2 duo. less than a year old, if i'm not mistaken.

  • Right shift and c not working, Left shift and c works fine for a capital c

     I have a Lenovo G560 laptop. Had this problem once before and computer tech fixed problem, but moved cities. Worked fine but recently had a windows update. Now when I press the right shift key and c nothing happens. Left shift and c displays a capital c. How do I restore the right shift c ?

    hi richiestac,
    You can try to remap the Right Shift Key so that it will function as Left Shift using Sharpkeys.
    To do this:
    1. Download and install Sharpkeys
    2. Open Sharpkeys, click on Add and on the Map this key (From Key) , select the Right Shift key, then on the To this key (To key), select the Left Shift key.
      - Link to picture
    3. When finished, click Write to Registry and reboot.
    As for the display driver installation, you need to uninstall first any signs of Intel HD Graphics from the Control Panel (Icon View) > Programs and Features. After that, open Device Manager > Display Adapters and uninstall the Intel Graphics (ensure you put a check on Delete the driver software for this device and try to re-install the Intel Onboard Graphics Driver.
    Alternatively, you can skip all the procedures above and just press the OneKey Recovery button to restore the system to factory settings (note that all data will be wiped on the OS partition).
    Regards
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • I need a replacement key for left shift, DV4 2106tx.

    This model is new and i can't find a spare key for the left shift key , the retainer broke and i can't do anything about it right now except asking for help, please tell me where and how can i get the spare key with retainers (i am also ready to buy the whole key set if required). Thank you.

    If it is new, have you try calling HP? They may send you a new keyboard.
    or
    try ebay, such as here
    Pavilion DV2922TX, XP-SP3 32bit, Intel T5750 2.0Ghz, Nvidia Geforce 8400M GS with 128MB, 4GB 667 DDR2, 250GB HDD

  • Left Shift - w doesn't work

    I'm unable to get a capital w when I use the left shift key. I am able to capitalize every other letter with the left shift key and I can get a capital W with the right shift key and the caps lock button. Anybody have a similar experience or have any recommendations to fix this?

    Go to the System Preferences->International->Input Menu and check the box "Keyboard Viewer" option. Also check the box at the bottom which says "Show input menu in menu bar". Now, access the Keyboard Viewer from the input menu in the menu bar (it looks like a little flag representing the language you are using) so that it displays a pictorial representation of your keyboard.
    With the Keyboard Viewer open try typing the 'W' and left 'shift' key combination together and observe whether the corresponding keys on the Keyboard Viewer highlight. This can help you determine whether you have a software issue, or whether your keyboard is not working correctly. I suspect software since the shift key seems to work with all of the other keys.
    Is it possible that somebody accidentally set a 'Keyboard shortcut" in the keyboard preferences under the 'Keyboard Shortcuts' tab? If in doubt try pressing the 'Restore Defaults" button within the Keyboard Shortcuts preferences to see if that helps.

Maybe you are looking for