logotransparent.png

Legion of Learners

www.lol-101.com

  • Home

  • Classrooms

  • Courses

  • About Us

    • Executive Team
    • Board Members
  • Resources

  • More

    Use tab to navigate through the menu items.
    To see this working, head to your live site.
    • Categories
    • All Posts
    • My Posts
    clarkipeng
    Jun 16

    6/16 Bit String Flicking Hw and Class Notes

    in Java for ACSL

    Today we went over Bit String Flicking. There are bitwise operations: OR (|), AND (&), XOR (^), and NOT (~). And there are shifting operations: LSHIFT, RSHIFT, LCIRC, and RCIRC. The order of precedence for these operations can be found here.


    Kahoot

    Lecture Notes

    HW



    HW answers:

    ~1 = 0

    ~01011 = 10100

    10010 | 11010 = 11010

    10001 & 01110 = 00000


    And I got a bonus question... can anyone find a formula/ pattern for the XOR of all numbers from 0 to x for any positive x? (without searching it up of course).


    Solution

    {x,1,x+1,0}[x%4]

    0 comments
    0
    0 comments

    Questions? Email us at legionoflearners@gmail.com or join our WeChat group!

    • lol-101dotcom

    ©2020 Legion of Learners