• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
niraj185 Avatar
Name:Unknown
Clan:Unknown
Member Since:Nov 2019
Last Seen:Aug 2021
Profiles:
Following:0
Followers:0
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (7)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • niraj185
    • commented on "Binary Simulation" python solution
    • 5 years ago

    Thanks for explanation. I never wrote code for bit operation, so its still difficult for me. I think I will practice some more bitwise operation coding and then come back to this.

    In this kata, for negation I tried -x -1 where x is "0b000" it does not work for all diffrent bits and length is also not same in all the cases.

  • Custom User Avatar
    • Blind4Basics
    • commented on "Binary Simulation" python solution
    • 5 years ago

    Hi, see my message above, plz.

  • Custom User Avatar
    • niraj185
    • commented on "Binary Simulation" python solution
    • 5 years ago

    Can you please explain how n ^= (1<<b-a+1)-1<<s-b gives ~n. Any webside or book refrence is fine.

  • Custom User Avatar
    • B1ts
    • commented on "Josephus Survivor" kata
    • 5 years ago

    No, use print(n, k) in the editor. (assuming it's python)

  • Custom User Avatar
    • Dr. Lugo
    • commented on "Josephus Survivor" kata
    • 5 years ago

    What do you mean? Should I type my solution here?

  • Custom User Avatar
    • B1ts
    • commented on "Josephus Survivor" kata
    • 5 years ago

    Print the input?

  • Custom User Avatar
    • niraj185
    • commented on "Josephus Survivor" kata
    • 5 years ago

    Looking for more tips. I solved by computing list, it works fine for test but not in attempt, due to lack of algorithem.

  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...