text:
Is this number evil?
Introduction
In number theory, a number is considered evil if there are an even number of 1's in its binary representation. In today's challenge, you will be identifying whether or not a given number is evil.
Challenge
Your job is to write a full program or function which accepts a single, non-negative integer as input and outputs (or returns) whether or not that number is evil.

You may output any truthy value if the number is evil, and any falsy value if the number is not evil.
You may input and output in any acceptable format.
Standard loopholes are disallowed.
OEIS sequence A001969 is the sequence containing all evil numbers.
Here is a list of the first 10000 evil numbers, for reference (and more test cases!)
This question is code-golf, so the shorter, the better.
Don't be put off by extremely short answers in golfing languages. I encourage you to submit in any language you like.
Here are some test cases:
3 => True
11 => False
777 => True
43 => True
55 => False
666 => False

The Leaderboard
At the bottom of the page is a stack snippet containing a leaderboard for this question. (Thanks, @MartinEnder)
To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:
# Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:
# Ruby, <s>104</s> <s>101</s> 96 bytes

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:
# Perl, 43 + 2 (-p flag) = 45 bytes

You can also make the language name a link which will then show up in the leaderboard snippet:
# [><>](http://esolangs.org/wiki/Fish), 121 bytes

/* Configuration */

var QUESTION_ID = 169724; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 81420; // This should be the user ID of the challenge author.

/* App */

var answers = [],
  answers_hash, answer_ids, answer_page = 1,
  more_answers = true,
  comment_page;

function answersUrl(index) {
  return "https://api.stackexchange.com/2.2/questions/" + QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function commentUrl(index, answers) {
  return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

function getAnswers() {
  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function(data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });
}

function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function(data) {
      data.items.forEach(function(c) {
        if (c.owner.user_id === OVERRIDE_USER)
          answers_hash[c.post_id].comments.push(c);
      });
      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });
}

getAnswers();

var SCORE_REG = /<h\d>\s*([^\n,<]*(?:<(?:[^\n>]*>[^\n<]*<\/[^\n>]*>)[^\n,<]*)*),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

var OVERRIDE_REG = /^Override\s*header:\s*/i;

function getAuthorName(a) {
  return a.owner.display_name;
}

function process() {
  var valid = [];

  answers.forEach(function(a) {
    var body = a.body;
    a.comments.forEach(function(c) {
      if (OVERRIDE_REG.test(c.body))
        body = '
' + c.body.replace(OVERRIDE_REG, '') + '
';
    });

    var match = body.match(SCORE_REG);
    if (match)
      valid.push({
        user: getAuthorName(a),
        size: +match[2],
        language: match[1],
        link: a.share_link,
      });
    //else console.log(body);
  });

  valid.sort(function(a, b) {
    var aB = a.size,
      bB = b.size;
    return aB - bB
  });

  var languages = {};
  var place = 1;
  var lastSize = null;
  var lastPlace = 1;
  valid.forEach(function(a) {
    if (a.size != lastSize)
      lastPlace = place;
    lastSize = a.size;
    ++place;

    var answer = jQuery("#answer-template").html();
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
      .replace("{{NAME}}", a.user)
      .replace("{{LANGUAGE}}", a.language)
      .replace("{{SIZE}}", a.size)
      .replace("{{LINK}}", a.link);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);

    var lang = a.language;
    lang = jQuery('' + lang + '').text();

    languages[lang] = languages[lang] || {
      lang: a.language,
      lang_raw: lang,
      user: a.user,
      size: a.size,
      link: a.link
    };
  });

  var langs = [];
  for (var lang in languages)
    if (languages.hasOwnProperty(lang))
      langs.push(languages[lang]);

  langs.sort(function(a, b) {
    if (a.lang_raw.toLowerCase() > b.lang_raw.toLowerCase()) return 1;
    if (a.lang_raw.toLowerCase() < b.lang_raw.toLowerCase()) return -1;
    return 0;
  });

  for (var i = 0; i < langs.length; ++i) {
    var language = jQuery("#language-template").html();
    var lang = langs[i];
    language = language.replace("{{LANGUAGE}}", lang.lang)
      .replace("{{NAME}}", lang.user)
      .replace("{{SIZE}}", lang.size)
      .replace("{{LINK}}", lang.link);
    language = jQuery(language);
    jQuery("#languages").append(language);
  }

}
body {
  text-align: left !important;
  display: block !important;
}

#answer-list {
  padding: 10px;
  width: 290px;
  float: left;
}

#language-list {
  padding: 10px;
  width: 500px;
  float: left;
}

table thead {
  font-weight: bold;
}

table td {
  padding: 5px;
}

<link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Sites/codegolf/all.css?v=ffb5d0584c5f">

Shortest Solution by Language

        Language
        User
        Score

Leaderboard

        Author
        Language
        Size

      {{PLACE}}
      {{NAME}}
      {{LANGUAGE}}
      {{SIZE}}
      Link

      {{LANGUAGE}}
      {{NAME}}
      {{SIZE}}
      Link

EDIT: I believe this question is not a duplicate of this, because whereas that question is asking to count the number of ones, this question is asking whether the number of ones is even. Although you can accomplish this question by simply counting the bits, there are other approaches too.

Sandbox.

Related (XOR-ing every binary digit is the same as taking the sum modulo-2).

Possible duplicate of Count the number of ones in an unsigned 16-bit integer

My language (R) only has 32-bit signed integers; beyond that it switches by default to a double; is it OK if we run out of precision?

@Giuseppe no problem, as long as your program works for 32 bits you're fine.

@BetaDecay I have tried to address that above. I personally don't think this is a duplicate though.

This is a dupe because you can take any of those answers and bolt mod 2 on the end

@BetaDecay but that doesn't work in reverse: i.e. you cannot take all of these answers and remove the mod 2. Therefore, this challenge invites some new methods.

@BetaDecay side note: is there meta consensus as to what constitutes a duplicate?

A challenge is a dupe if a trivial change can be made to answers of the original challenge to make them suitable for the duplicate challenge. Backwards compatibility is AFAIK not counted

@BetaDecay is there anywhere on meta that says that or not? Also, if this really is a dupe, what should I do? I still think this challenge can invite some different approaches.

Quick question: does the output need to be true/false or can it be 1/0?

@RobertS. any two values that are considered truthy and falsy in your language are fine.

Related: How on earth did llhuii output the Evil Numbers in 42 bytes of Python?

I believe that 666 => False should be a test case.

@JoKing if by broken you mean the random HTML at the bottom, that's due to misformatted answers. I've tried to edit or comment on all of those.

Why would you call this an "evil" number. There is a long standing tradition to declare the binary representation of the number as being "even parity".

@user2390246 finally, done. ;)

Leaderboard says "message": "Uncaught TypeError: Cannot read property 'forEach' of undefined", "filename": "https://stacksnippets.net/js", "lineno": 122, "colno": 18"

@SimonForsberg sorry, that doesn't happen for me...i don't know why it's happening for you.

@Amphibological I found out why, I'm getting "too many requests from this IP, more requests available in 57696 seconds" back from the Stack Exchange API. I think I know who to blame though.

Yes, 666 is not evil, but 616 is. More evidence corroborating Papyrus 115!

Someone needs to upvote this post so it's at 43 upvotes (an evil number)

Awaiting answer in evil

If a number has an equal number of ones in binary and decimal, is that double evil?

Z80 Assembly (8-bit), 2 bytes
The following code only works with values up to 255:
; Input is given in register A.
; P flag is set if A is evil.
B7     or A
C9     ret

16-bit version (works on all test cases), 3 bytes
This works with values up to 65535.
; Input is given in BC.
; Output is the same as above.
78     ld A,B
A9     xor C
C9     ret

If you're feeling adventurous, you can shave off 1 byte by storing the input in A and C like so
      ld BC, 777
C5    push BC
F1    pop AF

and then running
A9    xor C
C9    ret

However, this puts the burden on the caller, so it may be that the two bytes (push BC and pop AF) should be counted as well.

i like this but how does this work?  my memory for assembly (6502 + arm) are that ors are bitwise with 2 operands

@northern-bradley: The P flag is the parity of the OR result, i.e. the horizontal-xor of all the bits, i.e. popcnt mod 2.  x86 also has a parity flag (PF), but it's updated only from the low byte of the result even for wider operand-sizes like test eax,eax.  So for x86 you'd probably popcnt eax, edi / and eax,1 / ret.  (Fun fact: 8086 was designed to make source porting of 8080 asm trivial / doable by a machine.  The start of x86: Intel 8080 vs Intel 8086?.)

For x86-16, we can xor al,ah / ret (return value in PF), taking advantage of the same hardware feature in x86.  I wrote this up as an answer.

Is P allowed as per https://codegolf.meta.stackexchange.com/a/8509/29560? It's a single bit within the F (flags) register which has only three pairs of instructions affected by it. Also, this answer fails to mention it's only competing for 8-bit values, since A is an 8-bit register. This means it is unable to give an answer for 777, or any other unsigned value over 255.

Damn built-ins :P

@cschultz2048 A is paired with F, so I wouldn't accept AB or BA as a 16-bit value. BC is 16-bit, but then you need an extra instruction to load one of them into A before XORing the other. I've always just mentioned that my Z80 answers work fully up to 255 or 65535, depending on the question. Maybe add a 16-bit version as well? So 2 bytes for 8-bit values, 3 bytes for 16-bit values.

JavaScript (ES6), 18 bytes
f=n=>n?!f(n&~-n):1

Try it online!
Explanation
The bitwise logic goes like this:

For integers, ~-n is equivalent to -(-n)-1, so that just another way of doing n-1. In that particular case, we could actually have used n-1.
n & (n-1) removes the least significant bit set to 1 in n because decrementing n turns all trailing 0's into 1's and clears the 1 that immediately follows (by carry propagation), while leaving everything else unchanged.
Example for n = 24 (11000 in binary):
  11000 (24)                  11000 (24)
-     1                   AND 10111 (23)
-------                   ---------
= 10111 (23)              =   10000 (16)
   ^                           ^
   |                           |
   +--- this bit is cleared ---+

Therefore, we process as many recursive calls as there are 1's in the binary representation of n, inverting the result each time with !. The last call always returns 1.
Examples:
f(24) = !f(16) = !!f(0) = !!1 = true
f(7) = !f(6) = !!f(4) = !!!f(0) = !!!1 = false

Hello, I understand what the code does, but I just cannot figure out the logic/reasoning behind it, despite having read several articles about bitwise operations, checking if a number is a power of 2, etc. I know what a recursive function is. I just don't get why it has been used this way and why this works to answer to the puzzle, i.e. the link between the recursion and !f(power of two) <==> evil number. If you have time, explanation would be welcome :) thanks!

@supafly I've added an explanation. And BTW: welcome to PPCG!

The processing is very clear now. Still, the idea/reasoning is really magic! Thank you for the explanation!

Python 2, 25 bytes
lambda n:int(bin(n),13)%2

Try it online!
bin(n) gives a result like '0b10101'. Reading this as a base-13 integer, we get
$$ \color{red}{11\cdot13^5} + 1\cdot13^4 + 0\cdot13^3 + 1\cdot13^2 + 0\cdot13^1 + 1\cdot13^0 $$
which reduces modulo 2 to
$$\equiv \color{red}{1 \color{pink}{\cdot 1^5}} + 1 \color{#aaa}{\cdot 1^4} + 0 \color{#aaa}{\cdot 1^3} + 1\color{#aaa}{\cdot 1^2} + 0\color{#aaa}{\cdot 1^1} + 1\color{#aaa}{\cdot 1^0} \pmod 2 $$
$$\equiv \color{red}{1}+1+0+1+0+1 \pmod 2.$$
So int(bin(n),13)%2 equals 1 + (number of ones in bin(n)) modulo 2.
If n is evil, then the result is 1; otherwise it is 0.
I picked up this trick from Noodle9.

Japt -h!, 5 4 3 bytes
¤å^

Try it

Explanation
¤       :Convert to base-2 string
 å^     :Cumulatively reduce by XORing
        :Implicitly output the last element negated

@LuisfelipeDejesusMunoz, porting Kevin's 05AB1E solution also works out at 5 bytes, if you want to try for that.

¤¬x v this is kevin's answer

@LuisfelipeDejesusMunoz, yup, that's it.

05AB1E, 4 bytes
bSOÈ

Try it online or verify all test cases.
Explanation:
b       # Convert to binary string
        #  i.e. 777 → 1100001001
 S      # Change it to a list of 0s and 1s
        #  i.e. 1100001001 → ['1','1','0','0','0','0','1','0','0','1']
  O     # Take the sum
        #  i.e. ['1','1','0','0','0','0','1','0','0','1'] → 4
   È    # Check if it's even (1 as truthy, 0 as falsey)
        #  i.e. 4 → 1

Alternatively: b1¢È

R, 37 26 bytes
!sum(scan()%/%2^(0:31))%%2

Try it online!
An alternative to Robert S.'s answer, this eschews the built-in bit splitting but ends up less golfy and thanks to JayCe and digEmAll ends up coming in slightly golfier.
Only works for positive integers less than \$2^{31}-1\$.

Why don't hardcode 31 instead of log2 ? Try it online!

@digEmAll Which in turn means no need to define x

@digEmAll thanks! I wasn't sure about precision issues, although I suppose that past $2^{31}-1$ we (probably) lose precision in the %/% and %% operators so it would be a moot point.

Also intToBits supports only integer values up to 2^31-1 ;)

C# (Visual C# Interactive Compiler), 43 38 bytes

Golfed Try it online!
i=>Convert.ToString(i,2).Sum(c=>c)%2<1

Ungolfed
i => Convert.ToString( i, 2 ).Sum( c => c ) % 2 < 1

Full code with tests
Func<Int32, Boolean> f = i => Convert.ToString( i, 2 ).Sum( c => c ) % 2 < 1;

Int32[] testCases = { 3, 11, 777, 43, 55 };

foreach( Int32 testCase in testCases ) {
    Console.Write( $" Input: {testCase}\nOutput: {f(testCase)}" );
    Console.WriteLine("\n");
}

Console.ReadLine();

Releases

v1.1 - -5 bytes - Replaced Count to Sum
v1.0 - 43 bytes - Initial solution.

Notes

None

Upvoted for the chuckle your "ungolfed" version gave me.

Bash (no external utilities), 56 44 bytes
while(($1));do set $(($1/2)) $(($2+$1%2));done;!(($2%2))

(($1))&&exec $0 $[$1/2] $[$2+$1%2];!(($2%2))

This assumes that the number is found in $1, having been passed as the first command line argument. It also assumes that this is a shell script (so that it can exec itself).
It recurses, after a fashion, using exec $0, until the number (in $1) reaches zero, dividing it by two in each iteration. It also sums (in $2) the number of times we get a number that is odd.  At the end, the original number was "evil" if the sum in $2 in not odd.
Example invocations:
$ ./script 3 && echo evil
evil

$ ./script 11 && echo evil

$ ./script 777 && echo evil
evil

$ ./script 43 && echo evil
evil

$ ./script 55 && echo evil

For 0:
$ ./script 0 && echo evil
./script: line 1: ((: %2: syntax error: operand expected (error token is "%2")
evil

Correct result, with a bit of extra on the side.

Stax, 4 bytes
:1|e

Run and debug it
:1|e Full program, implicit input-evaluation
:1   Count set bits
  |e Check if even

INTERCAL, 90 65 63 bytes
DOWRITEIN:1
DO:2<-'#0$#65535'~?':1~:1'
DOREADOUT:2
PLEASEGIVEUP

Try it online!
Ungolfed and expanded (for what it's worth) with C style comments.
DO WRITE IN :1 //Store user input in 1
DO :2<-:1~:1 //Select just the ones. So will convert binary 10101 to 111
DO :3<-:?2 //Run the unary xor over the result. Essentially, xor with the right bitshifted
           //(with wraparound) value).
DO :9<-#0$#65535 //Intermingle the 16 bit values of all 0's and all 1's, to create a
                 //32 bit number with 1's in the odd positions.
DO :4<-:9~:3 //It turns out that at this point, evil numbers will have no bits in odd
             //positions, and non-evil numbers will have precisely one bit in an odd
             //position. Therefore, the ~ will return 0 or 1 as appropriate.
PLEASE READ OUT :4 //Politely output
PLEASE GIVE UP //Polite and self explanatory

I had to make a few concessions to make this feasible in INTERCAL. The first is, as with all INTERCAL programs, numerical input must be written out. So if you want to input 707 you would provide SEVEN OH SEVEN.
The second is that INTERCAL doesn't really have proper truthy or falsy value. Instead, it will output the Roman Numeral I (1) if the number is not evil, or a 0 (typically represented as - since Roman Numerals can't normally represent 0).
If you want to flip those so that evil numbers return 1 and non-evil numbers return 0, you can change lines 4 and 5 from the ungolfed version as follows, although it does add 3 bytes.
DO:9<-#65535$#0
DO:4<-#1~:9~3

R, 99 98 44 34 28 bytes
-1 thanks to Kevin Cruijssen! -54 thanks to ngm! -10 thanks to Giuseppe! -6 thanks to JayCe!
!sum(intToBits(scan())>0)%%2

Try it online!

Alternatively, using the binaryLogic package (39 bytes):
!sum(binaryLogic::as.binary(scan()))%%2

I don't know R too well, but I'm pretty sure ==0 can be <1 :)

@KevinCruijssen You're right. Should have seen that. Thanks!

43 bytes?

@ngm That works! Didn't think it would be that simple. Thanks. I'm getting 44 bytes though.

Nice! 34 bytes is possible

@Giuseppe Wow! I've definitely learned some R code golf tips from this one. Thanks.

This works as well I think : 32 bytes
But requires a bit of an explanations :)

@digEmAll This is a good suggestion for Giuseppe's answer!

Oh, I didn't notice that answer... I'll post there

it's easy to turn this into a full program for some more bytes

@JayCe Easy enough! Thanks.

PHP, 37 36 bytes
<?=1&~substr_count(decbin($argn),1);

To run it:
echo '<input>' | php -nF <filename>

Or Try it online!
Prints 1 for true, and 0 for false.
-1 byte thanks to Benoit Esnard!

I think you can save one byte by removing the modulo operation: <?=1&~substr_count(decbin($argn),1);. This one also prints 0 for false.

Thanks @BenoitEsnard! That's very clever, I've updated my answer :) You learn something new every day!

Brachylog, 4 bytes
ḃo-0

Try it online!
With multiple test cases ( is evil and  is not.)
Uses something I discovered  recently about the - predicate: its documentation just says "the difference of elements of [input]", but what it actually does is "sum of even-indexed elements (starting from 0th) of input, minus the sum of odd-indexed elements of input".
Here,
ḃ converts the number into an array of binary digits,
o sorts them to bring all the 1s together.
Now, if there were an even number of 1s, there would be an equal number of 1s in even indices and odd indices. So the - after that would give a 0. But if there were an odd number of 1s, there would be an extra 1 sticking out, resulting in the difference being either -1 or 1.
So, finally, we assert that the difference is 0, and get a true or false result according to that. With more flexible output requirements, this could be removed for a 3 byte answer, with 0 as truthy output and -1 and 1 as both falsey outputs.

evil, 48 42 40 39 36 35 bytes
golf 1: flipping many ms to js and js to ms saved quite a bit of marking mode changes
golf 2: do..while -> repeat..until
golf 3: tbxb -> sxb - can be seen to be the same, but less intuitive
golf 4: the vzv in vtfvzv turned out to be renundant, because the accumulator already zero at that point
golf 5: aayuoy -> aluoy and tbuw -> tbaw, now outputs 0x02 for evil and 0x00 for normal
I can confirm that this language is absolutely evil. Even though it is more powerful than e.g. brainfuck, it feels worse.
Inputs via char code, outputs via char code (0x02 = evil, 0x00 = normal). This would be slightly (probably by 1 byte) shorter if the output values could be merely consistent and not necessarily falsy and truthy.
Uses a trick: to count set bits, the code adds elements to the wheel, a circular list, and then calculates the list size's parity by setting the first one to 1, the second one to 2 and traversing the list 2 steps at a time until a non-zero element is found.
rvmvtfxjxutctbuvavsxbmaluoymiiptbaw

Here's an explained version (I do not expect anybody to understand the monstrosity above, but the explanation is in a spoiler so that you can try) (I was also writing the code immediately with these comments):

COMMENTS ARE UPPERCASE, CODE IS LOWERCASE

r READ INPUT AS CHAR CODE
NOW DECREASE AND CHECK PARITY, WHILE ALSO COMPUTING N/2 IN THE FIRST PENTAL CELL
v STORE TO FIRST PENTAL CELL
m BEGINNING OF OUTER LOOP

vtf IF ZERO, DONE
NOW THE ACCUMULATOR HAS THE CORRECT VALUE AND THE PENTAL CELL IS ZERO, JUST LIKE IT SHOULD BE.

x SET MARKING MODE INITIALLY
j BEGINNING OF INNER LOOP
x UNSET MARKING MODE AGAIN
u FIRST DECREMENT
IF ZERO (ODD), INCREASE BIT COUNTER AND PROCEED TO NEXT ITERATION
tc THIS LANGUAGE SEEMS COMPARABLE TO MALBOLGE. THIS ADDS A NEW CELL TO THE WHEEL, A RESIZABLE CIRCULAR LIST. I USE IT AS THE BIT COUNTER
tb GO TO NEXT ITERATION OF OUTER LOOP
ODD CASE HANDLED. EVEN CASE IS (MUCH) SIMPLER
u SECOND DECREMENT
vav INCREMENT FIRST PENTAL CELL

sxb IF ZERO, GO TO THE NEXT ITERATION OF THE OUTER LOOP; ELSE GO TO THE NEXT ITERATION OF THE INNER LOOP; EQUIVALENT TO TBXB.

m END OF OUTER LOOP

DO SORCERY TO COUNT WHEEL CELLS.
al SET FIRST WHEEL CELL TO 1 (AND RESET THE ACCUMULATOR BACK TO 0 BY SWAPPING)
uoy SET SECOND CELL TO -1

NOW IN A LOOP CHECK WHETHER 1 OR 2 GOES FIRST AND OUTPUT THE CORRESPONDING NUMBER

m BEGINNING OF THE LOOP
ii GO RIGHT TWICE
p READ WHEEL
tb IF STILL ZERO, GO BACK
NOW THE NON-ZERO ELEMENT WAS FOUND
a INCREMENT SO THAT VALUES ARE ACTUALLY FALSY AND TRUTHY. IF THAT REQUIREMENT WASN'T THERE, THE CODE COULD BE REDUCED SLIGHTLY (AT LEAST BY REMOVING THIS BYTE)
w PRINT

Now, the most evil part. This code does not work with the normal interpreter, because it has a bug. The bug is that the command to add a cell to the wheel quite literally doesn't add a cell to the wheel (to be specific, it's missing wheelSize++;). I assume that the bug is obvious enough for me to avoid accusations of adding new built-ins to the language.
You can Try it online! using my fixed interpreter.

Bonus: Is you code as a base64 number evil?

@petStorm seems to be evil both in base64 and base36 :)

x86-16, 3 bytes
NASM listing:
 1                                  parity16:
 2 00000000 30E0                        xor al,ah
 3 00000002 C3                          ret

16-bit integer function arg in AX (which is destroyed), return value in PF.
The hardware calculates the parity of the result for us, in x86's Parity Flag.  The caller can use jp / jnp to branch, or whatever they like.
Works exactly like @cschultz's Z80 / 8080 answer; in fact 8086 was designed to make mechanical source-porting from 8080 easy.
Note that PF is only set from the low byte of wider results, so test edi,edi wouldn't work for an x86-64 version.  You'd have to horizontal-xor down to 16 bits, or popcnt eax, edi / and al,1 (where 0 is truthy).

C (gcc), 36 bytes
c;f(n){for(c=0;n;c++)n&=n-1;n=~c&1;}

Try it online!
Method from K&R https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan
Must be compiled with optimization level 0

Doesn't compile on gcc 5.4.0: error: expected constructor, destructor, or type conversion before '(' token (arrow is pointing at the f in the function name). What compiler flag(s) do I need?

Doesn't work with -O.

"Returns 0 for truthy, 1 for falsey"
Is this legal? Not trying to discredit your answer, just curious, and because it would save me a byte.
Note: The word truthy in the question links to this answer. And this comment also mentions truthiness.

@nwellnhof @villapx Compiles fine on my 7.3.0 - just make sure you're not missing the -O0 compiler flag.

@Borka223 hmmm after months of perusing this site, I was under the impression that truthy and falsey could be anything, so long as they are consistent within your solution. However, the answer you linked certainly seems to contradict that. I went ahead and added the byte. Thanks

I assume we are calling the function with only n? If so, c is uninitialised.

@gastropner Thanks. Interesting bug - it had 50/50 chance of working properly. If the uninitialized value was an even number (and not large enough to overflow), it would work fine

Wolfram Language (Mathematica), 24 22 bytes

Saved two bytes thanks to Misha Lavrov.

2∣DigitCount[#,2,1]&
Try it online!

2∣ is an improvement on EvenQ. Try it online!

Ruby, 32 29 28 27 21 bytes
->n{("%b"%n).sum%2<1}

Where we use the fact that sum sums each character and given 1 is an odd number, and because we eventually do modulus 2, that makes it equivalent to count(?1):
->n{("%b"%n).count(?1)%2<1}

Where <1 is a shorter substitute for even?:
->n{n.to_s(2).count(?1).even?}

Where n parameter should be an integer.

%2==0 saves 1 byte.

@iamnotmaynard, thank you, thank you! I couldn't accept that python solution would be shorter :) wow, now I see it got 27 :/

Instead of %2==0 can't you do something like %2<1 to save a byte?

@auhmaan Oh yeah, even better.

@auhmaan, my hero, now we are on par with python. I wonder though, wasn't there a rule to return boolean by 1 or 0 if desired? Or only for languages where these evaluate to true/false by convention?

The challenge specifically says that it wants a truthy or falsey value, which the  current consensus on Meta defines based on how a conditional handles it, so for non-evil numbers your Ruby code would have to output false or nil.  (Note that's language specific, so it's OK that my Python answer returns 0 or 1.)  Sometimes challenges just ask for you to output one of two distinct values, though, in which case 1 and 0 would be fine.

@JackBrounstein, thank you very useful. I couldn't find a list of officially accepted rules for the site :/

("%b"%n).count(?1)%2 is the same as ("%b"%n).sum%2

@GB, wow, nice suggestion. I can't understand why such method went into the API but works for the task at hand.

x86-16 machine code, 3 bytes
32 C4     XOR  AL, AH     ; PF = (AX >> 8) XOR AL
C3        RET             ; return to caller

Input is AX, output is in PF; PE if True (Evil) or PO if False (Not Evil).
This is actually the exact use of the x86 Parity Flag, with the only twist being that normally it only operates on the LSB of a WORD register.  However, you can get the Parity of a WORD by XOR'ing the high byte and the low byte.
Example output from a test program for PC DOS:

DANG IT, I should have looked at the other answers first...  @PeterCordes submitted this in 2018...
https://codegolf.stackexchange.com/a/169903/84624

Since the previous J solution by Adam is invalid for numbers having odd number of binary digits, here is a corrected one:
J, 8 bytes
1-~:/&#:

Try it online!
Anonymous tacit verb.
How it works
1-~:/&#:    Right argument: the number to test.
      #:    Convert to binary digits
  ~:/&      Reduce by not-equal (same as XOR for zero-one values)
1-          Invert the result

Alternatively, J has a built-in XOR that computes bitwise XOR over the input.
J, 8 bytes
1-XOR&#:

Try it online!

Julia 0.6, 20 bytes
n->count_ones(n)%2<1

Try it online!

C++ (gcc) (-O0),  36  31 bytes
int f(int i){i=!i||i%2-f(i/2);}

Try it online!

C++ (clang), 35 bytes
int f(int i){return!i||i%2-f(i/2);}

Try it online!

Here is my first attempt at code golfing, hope I didn't break any rule I might have missed.
Edit:
- Saved 5 bytes thanks to @Jonathan Frech : replaced != by - and return by i= (the last replacement does not seem to work with clang though)
- Since there seems to be a debate whether I should use gcc -O0 abuse, I thought I could just give both versions

Welcome to PPCG! You may be able to save a byte by golfing != to - and another four by golfing return to i=.

@JonathanFrech It's been a long time since I did C++, does it implicitly return the last assigned expression in a function if there's no return statement? I'm guessing it's a gcc thing?

It is a gcc specific undefined behaviour abuse on optimization level O0.

By switching to K&R C, you can get it down to 23 bytes (very impressive!) Try it online!

@JonathanFrech: why do people insist on using that stupid gcc -O0 hack?  It's not like the length of a language's total boilerplate matters much when comparing implementations.  Also, it makes it more interesting to choose between return vs. call-by-reference (updating *i in place).  I'd rather write C or C++ answers, not un-optimized-gcc-only answers, because un-optimized-gcc isn't a very useful language.

@PeterCordes For one I do not insist on this compiler-specific quirk, but I merely suggested it as it does save bytes. Our current policy allows every such quirk in any language implementation; I do not think that is "stupid". Furthermore, we strive to golf our submissions as far as possible. If you do not like this method, you can always write in a more specific flavour of C, like C clang or C using O1.

@JonathanFrech: When I golf in C, I like to golf in ISO C89 and write portable code that works with gcc -O0 or clang -O3.  If there's something interesting to be gained by assuming 2's complement or something, then I'll mention it.  I know calling it "stupid" is going a bit far, but I really dislike it.  Partly because I like looking at compiler asm output, and -O0 is dumb.  I don't think this was the intent of the "works on at least one implementation".  An output arg like Tips for golfing in C can work in some cases.

Regex (ECMAScript), 37 33 bytes
-4 bytes thanks to Neil's idea of subtracting the least-significant two bits instead of the most-significant two bits
^(((?=(((x*)(?=\5$))*))\3x){2})*$

Try it online!
Takes its input in unary, as a string of x characters whose length represents the number.
^
(
    # Subtract the two least-significant "1" bits as
    # they would be in tail's binary representation.
    (
        # Divide tail evenly by 2 as many times as we can, atomically
        (?=
            (((x*)(?=\5$))*)
        )\3
        x                # Subtract a 1 bit
    ){2}
)*                       # Loop as many times as possible...
$                        # and only match if the final result is 0.

Regex (Perl / Java / PCRE / Python / Ruby), 26 bytes
^((((x*)(?=\4$))*+x){2})*$

Try it online! - Perl
Try it online! - Java
Try it online! - PCRE
Try it online! - Python import regex
Try it online! - Ruby
^
(
    # Subtract the two least-significant "1" bits as
    # they would be in tail's binary representation.
    (
        # Divide tail evenly by 2 as many times as we can, atomically
        ((x*)(?=\4$))*+
        x                # Subtract a 1 bit
    ){2}
)*                       # Loop as many times as possible...
$                        # and only match if the final result is 0.

Regex (.NET), 29 bytes
^(((?>((x*)(?=\4$))*)x){2})*$

Try it online!

^((((.*)(?=\4$))*.(.*)(?=\5$)){2})*$ is only 36 bytes.

K (ngn/k), 6 bytes
1=/~2\

Try it online!

~2\ convert input to base-2 representation, and not it (flip 0s and 1s)
1=/ do an equals-reduce seeded with 1; returns 1 if there are an odd number of 1's in the inverted base-2 representation and 0 if there are an even number(or none at all)

Seems to be a false positive on 7 (111, (1=1)=1).

Good catch - revised the logic and verified that it now covers at least the first 50-ish terms from https://oeis.org/A001969

Python 2, 29 bytes
lambda n:~bin(n).count('1')&1

Try it online!
Returns 1 if True, else 0.
Converts the number to a binary string like '0b11', counts the number of 1s, gets the complement of result, and returns the last bit of the complement (thanks, https://codegolf.stackexchange.com/users/53560/cdlane!) (1 if the original number was even, 0 if it was odd).

No fewer bytes but lambda n:~bin(n).count('1')&1 replaces the modular division with something potentially less expensive.

You can do lambda x:~x.bit_count()%2 which is shorter

Perl 6, 21 bytes
*.base(2).comb(~1)%%2

Test it
Expanded:
*\        # WhateverCode lambda (this is the parameter)
.base(2)  # Str representing the binary
.comb(~1) # find the "1"s

%% 2      # is the count of "1"s divisible by 2?

{:3(.base(2))%%2}

Attache, 13 12 bytes
Even@Sum@Bin

Try it online!
(Old 13 bytes: Even@1&`~@Bin)
This is a composition of three functions:

Bin
Sum
Even

This checks that the Sum of the Binary expansion of the input is Even.

:| i have no words

@ASCII-only quite succinct, eh? c:

dc, 18 16 bytes
[2~rd1<M+]dsMx2%

Returns (to the stack) 0 for evil and 1 for not evil
Try it online!
Fairly straightforward - recursively applies the combined quotient/remainder operator ~ to the new quotient and adds all the remainders together, then mods by 2 (after spending two bytes to flip to a standard truthy/falsy).
Edited to reflect consensus that 0 for truthy and 1 for falsy is okay, especially in a language that has no sort of if(boolean) construct.

APL (Dyalog Unicode), 10 bytesSBCS
Anonymous tacit function. Can take any array of integers as argument.
≠⌿1⍪2∘⊥⍣¯1

Try it online!
2∘⊥⍣¯1 convert to binary, using as many digits as needed by the largest number, separate digits along primary axis
1⍪ prepend ones along the primary axis
≠⌿ XOR reduction along the primary axis

Java (JDK 10), 20 bytes
-6 bytes thanks to Roberto Graham
n->n.bitCount(n)%2<1

Try it online!

20 bytes Try it online!

@RobertoGraham Thanks, forgot you can call static methods on a variable.

Wolfram Language (Mathematica), 14 bytes
ThueMorse@#<1&

Try it online!
The Nth element of the Thue-Morse sequence is 1 if the number of binary digits in N is odd, and 0 otherwise.

C# (.NET Core), 34 bytes
bool f(int i)=>i<1||i%2<1==f(i/2);

Try it online!
There were already a few C# solutions, but this is the first recursive one.
In the case case when no more 1's are present, the function is terminated with a positive result. Otherwise the lowest bit is tested. If it is set, then the count of the rest of the bits must be odd. If it is unset, then the count of the rest of the bits must be even. We are able to determine whether the count of the remaining bits is even/odd by making a recursive call to half the input.

SML, 32 Bytes
fun%0=1| %n=(n+ %(n div 2))mod 2

Explaination:

% is function name
takes in input in repl and returns 1 if evil, 0 otherwise
n is input, returns (n + %(n//2)) % 2

Made by 2 bored Carnegie Mellon Students

Welcome to PPCG, and good first answer!

Rust, 24 bytes
|x:u8|x.count_ones()&1<1

Note that this only works for 8-bit numbers.
The following works for 64-bit (but is an extra character):
|x:u64|x.count_ones()&1<1

Testing code:
fn main() {
    let f = |x:u64|x.count_ones()&1<1;

    const TESTS: [(u64, bool); 6] = [
        (3, true),
        (11, false),
        (777, true),
        (43, true),
        (55, false),
        (666, false)
    ];

    for (x, b) in TESTS {
        assert_eq!(f(x), b);
    }
}

Vyxal, 4 bytes
b1O₂

Try it Online!

JavaScript (Babel Node), 39 bytes
-1 Bytes thnks to @OMᗺ =D
_=>eval('for(z=0;_;_>>=1)z+=_&1;z%2<1')

Try it online!

C#, 65 bytes
So I'm terrible at codegolf, but here's my hacky string + LINQ solution:
n=>{return Convert.ToString(n,2).Where(c=>c=='1').Count()%2==0;};

Try it online!

A few tips: .Where(c=>c=='1') you can save 1 byte by comparing if c is bigger than '0', and you can save another byte by changing '0' to the decimal representation 48. One more byte can be saved on .Count()%2==0 by comparing if the result is less than 1, resulting in this solution: n=>{return Convert.ToString(n,2).Where(c=>c>48).Count()%2<1;};

Also, you can save more 8 bytes by moving the predicate from Where to Count and removing the Where completely. Your solution would end up like this n=>{return Convert.ToString(n,2).Count(c=>c>48)%2<1;}; for a total of 54 bytes.

C (gcc), 29 bytes
f(a){a=!__builtin_parity(a);}
Uses a GCC builtin, and exploits how GCC handles return values, only works at -O0 optimization level (the default).
Try it online!

Lua 5.3.4, 63 62 bytes
-1 bytes thanks to Jo King
function e(n)o=0while n>0 do o=o+n n=n//2 end return o%2<1 end

More readable version:
function e(n)
  o=0
  while n>0 do
    o=o+n
    n=n//2
  end
  return o%2<1
end

n is the input and integer divided by 2 until it is equal to 0. o is incremented by n, and its parity is what determines the output. This function returns true if evil or false if odious (not evil).

Java 8, 40 36 bytes
n->n.toString(n,2).chars().sum()%2<1

-4 bytes thanks to @Okx for something I shouldn't have forgotten myself..
Try it online.
Explanation:
n->                // Method with Integer parameter and boolean return-type
  n.toString(n,2)  //  Convert the integer to a binary String
   .chars()        //  Convert that to an IntStream of character-encodings
   .sum()          //  Sum everything together
    %2<1           //  And check if it's even

Note that the character encoding for 0 and 1 are 48 and 49, but summing them and taking modulo-2 still holds the correct results because 48%2 = 0 and 49%2 = 1.

n.toString(n,2) saves 4 bytes.

@Okx Not sure how I forgot about that one, lol.. Thanks! ;)

If you're allowed to use 1 and 0 instead of true and false (not sure for Java), you can change to: ~n.toString(n,2).chars().sum()%2 to save one byte.

@MarDev Unfortunately 0 and 1 aren't truthy/falsey in Java, only booleans/Booleans are. If a challenge would state two distinct outputs are allowed the <1 could have been removed to save 2 bytes indeed. :)

x86 Assembly, 12 11 bytes
F3 0F B8 44 24 04  popcnt      eax,dword ptr [esp+4] ; Load EAX with the number of ones in arg
F7 D0              not         eax ; One's complement negation of EAX
24 01              and         al,1 ; Isolate bottom bit of EAX
C3                 ret

-1 byte thanks to @ceilingcat's suggestion

@ceilingcat Good catch!

Suggest inc eax instead of not eax. Also may want to mention that this requires a processor with support for the popcnt instruction.

also you do not have to take arg from stack. see allowed calling conventions https://codegolf.stackexchange.com/a/161497/17360 (Peter Cordes's more in-depth answer https://codegolf.stackexchange.com/a/165020/17360)

Note that you may return a boolean in FLAGS https://stackoverflow.com/a/48382679/3163618

Shouldn't 666 be a test case?

@ArcanistLupus  666 is not evil; 616 is evil

You can skip the inversion if you decide that 0 means truthy and 1 means falsy, or returning a result in EFLAGS could be easier to justify (either PF or ZF).  But yeah, the main saving would be a better calling convention.  e.g. make this an x86-64 answer and the arg will be in edi (x86-64 System V) or ecx (Windows x64).  Or simply use a 32-bit fastcall convention.

Forth (gforth), 53 bytes
: f 1 swap begin 2 /mod -rot xor swap ?dup 0= until ;

Try it online!
Explanation
Takes the xor-sum of the digits of the binary form of the number. (repeatedly divides by 2 and xors the remainder with the "sum" value)
Code Explanation
: f              \ begin a new word definition
  1 swap         \ place 1 on the stack below the input (n)
  begin          \ start an indefinite loop
    2 /mod       \ get the quotient and remainder of dividing n by 2
    -rot         \ move the sum and remainder to the top of the stack
    xor          \ xor the sum and remainder
    swap         \ move the quotient back to the top of the stack
    ?dup         \ duplicate if > 0
    0=           \ get "boolean" indicating if quotient is 0
  until          \ end the loop if it is, otherwise go back to the beginning
;                \ end the word definition

Excel, 43 41 39 41 bytes
-2 bytes thanks to Keeta
-2 bytes thanks to Sophia Lechner
+2 bytes thanks to sundar
Original:
=MOD(LEN(SUBSTITUTE(DEC2BIN(A1),0,"")),2)=0

Shortest version:
=MOD(LEN(SUBSTITUTE(DEC2BIN(A1),0,)),2)=0

Since "" is the default third argument for SUBSTITUTE, you can save two bytes with =MOD(LEN(SUBSTITUTE(DEC2BIN(A1),0,)),2)=0

If you change your "truthy/falsey" to be 1 and 0 instead of TRUE and FALSE, you can omit the last "=0"

(regarding clarifying last comment) - true would be 0 and false would be 1.  Then... you could further golf by omitting the 0 in the SUBSTITUTE statement and Excel assumes a 0 - but then you have to leave the quotes in.  Better to take out the quotes instead

@SophiaLechner, what version of Excel are you using? This doesn't seem to be the case in Excel 2013

@SophiaLechner Never mind, I see what you meant :)

Note that question links to a meta answer which gives a specific definition of truthy/falsey: you should be able to use the output in a conditional, for eg., =IF() in this case, and have it work like TRUE or FALSE. Many other questions have more flexible output requirements, so 0 for true and 1 for false would be fine there, but here I think you'll have to stick to the 41 byte version.

Python 2, 28 27 bytes
f=lambda n:n<1or n&1^f(n/2)

Try it online!
Returns a truthy value if exactly one of the ones-bit is a 1 and the result of calling this function on n/2 is truthy is true (or n==0).  It works because n/2 is equivalent to a right bitshift with floor division (so Python 2 only).
Alternate version, also 28 27 bytes
g=lambda n:n<1or g(n&n-1)^1

Try it online!
Based on the K&R method of counting set bits referenced by vazt.
Both of these could be two bytes shorter if the output allowed falsey to mean evil.
Edit: Thanks to Amphibological for saving a byte!

You can remove the spaces between the 1 and the or to save +1 byte. Nice solution!

Retina 0.8.2, 28 bytes
.+
$*
+`(1+)\1
$+0
0

11

^$

Try it online! Link includes test cases. Explanation:
.+
$*

Convert to unary.
+`(1+)\1
$+0

Partial binary conversion (leaves extra zeroes).
0

Delete all the zeros.
11

Modulo the ones by two.
^$

Test whether the result is zero.

Pyth, 6
!xFjQ2

Explanation
   jQ2 # Convert input to base 2 list
 xF    # reduce on XOR
!      # logical negation

J, 9 bytes
Anonymous tacit function. Can take any integer array as argument.
1-2|1#.#:

Try it online!
1- one minus (i.e. logical negation of)
2| the mod-2 of
1#. the sum (lit. the base-1 evaluation) of
#: the binary representation

Nice one! the boring approach is 9 bytes: 2|1+1#.#:

This only seems to work because 777 in the input makes every number be represented in 10 bits. Replace it with e.g. 480 and the output flips.

@ConorO'Brien Boring trumps incorrect.

@FrownyFrog Fixed.

MATLAB / Octave, 28 27 25 bytes
Using the de2bi function from the comm. systems MATLAB toolbox, you can achieve 25 bytes
@(n)~mod(sum(de2bi(n)),2)

Here is the 27 byte version which works without toolboxes (so works in Octave):
@(n)~mod(sum(dec2bin(n)),2)

The dec2bin conversion outputs a character array, so counting the occurence of the character '1' mod 2 gives the opposite of an evil number, negating that with ~ gives the answer.
Edited to include Sundar's comments (made it a valid anonymous function and saved by leveraging ASCII values instead of comparing to '1').

de2bi(n) can replace dec2bin(n)=='1' if toolboxes are allowed.

I think submissions have to be either full programs or functions, so you'll have to add a @(n) at the beginning to make this an anonymous function. You can save 2 bytes by replacing =='1' with -48 though.

I believe @(n)~mod(sum(dec2bin(n)),2)  would also work, for total 27 bytes. (Works because '1' is ASCII 49, so the result of the sum will be even only if there are an even number of '1' characters in the dec2bin result.)

@sundar Thanks, included

@(n)~mod(sum(de2bi(n)),2) works with toolboxes.

@Ander Cheers, orhym had suggested this too but don't know why I didn't add it in.

Bash + GNU utilities, 33
dc -e2o?p|tr -d 0|wc -c|dc -e?2%p

Try it online!
Reads input from STDIN.  Outputs 1 for True and 0 for False.

dc converts input to a binary string
tr removes zeros
wc counts remaining ones (and trailing newline, which corrects sense of logic
dc calculates count mod 2 and outputs the answer

C# (.NET Core), 50 48 45 bytes
-3 bytes thanks to Charlie
n=>{int i=0;for(;n>0;n/=2)i^=n%2;return i<1;}

Try it online!

47 bytes using a for instead of a while. And welcome to PPCG!

Sorry, 45 bytes using your XOR solution.

@Charlie: Edited, thanks for the tip

CJam, 16 14 11 10 bytes
Can't believe there's no CJam/GolfScript answer yet.
qi2b1e=1&!

Try it out! (Online)

Explanation
qi                     Reads input as an integer
  2b                   Converts it to an array of its digits in base 2 (binary)
    1e=                Checks the number of occurrences of 1 in that array
       1&              The rightmost bit of the number of 1s (a test for evenness)
         !             Unfortunately we need to return 1 for evenness and not 0 (and vice versa)
                       Implicit output 1 for true and 0 for false

This answer isn't very good in comparison to other answers here, but I might as well post and see if some CJam people can help golf this answer further.

Changes:
Helen cut off 2 bytes!
Old: qi2b1e=2%0={1}0?
New: qi2b1e=2%0=X0?
By replacing the block ({1}) with X (whose value is always initialised to 1) we can cut out 2 characters and don't have to add in any whitespace.
The If-Else still works without the block, funnily enough.

Helen cut off 3 bytes!
Old: qi2b1e=2%0=X0?
New: qi2b1e=2%0=
We don't need to manually push 1 and 0 to the stack depending on the result of the comparison since 1/0 are automatically pushed for true/false respectively.

Helen cut off 1 byte!
Old: qi2b1e=2%0=
New: qi2b1e=1&!
By keeping the rightmost bit of the number, we can test for evenness without having to use modulo.

Alchemist, 117 105 99 93 bytes
_->In_a+s
a+0z->z
a+z+0c->b
z+0a+0c+f->
z+0a+0c+0f->f
b+0a+0z->c
c+0b->a
0a+0b+0c+0z+s->Out_f

Try it online!
Trying out BMO's new language! Outputs 0 if the number is evil and 1 otherwise. It took me quite a while to figure out how to check if there is only one of an atom left.
Explanation:
Input
_->In_a+s     Convert the initial _ atom to input copies of atom a
              And an s atom as a flag
Division
a+0z->z       Always have one z atom by converting an a atom
a+z+0c->b     Convert an a atom and a z atom to a b atom
              This divides the a atoms by 2 into b atoms
              With a z atom as the parity
z+0a+0c+0f->f Convert the z atom to an f atom if there aren't any f atoms
z+0a+0c+f->   If there is an f atom, remove both

Reset to calculate the next binary digit
b+0a+0z->c    Convert all b atoms to c atoms
c+0b->a       Convert all c atoms to a atoms

Output
0a+0b+0c+0z+s->Out_f  If there are no relevant atoms left
                      Output the number of f atoms

wow, nice. also, close :(

also -1 nondeterministic :P

Also, haha, we came up with the same solution of checking for 1

:D tie, if it works. as an added bonus, it's deterministic

@ASCII-only i had a leftover unnecessary term, so -3 bytes :). I was wondering what was non-deterministic, but it turns out the d+0f->f rule goes off whenever it wants. Still technically deterministic since it doesn't affect anything

well. if i invert output then 103 :P, and 99 without determinism

I see though that you don't use BMO's method of having a state atom. Also, you might wanna check if aliasing (e.g. a+0c->g) makes it shorter

I've sort of been winging it? The non-deterministic routes remind me a bit of Lost

Haha, yeah. I'm sure BMO has been winging it too lol

Darn, tie again :P

@ASCII-only You can switch most rules with flag1 + ... -> flag1 + ... to 0flag2 + ... -> ... to save a byte for each rule affected. 95 bytes

Let us continue this discussion in chat.

05AB1E, 4 bytes
b1¢È

Try it online!
Converts to binary b, counts occurrences of 1 1¢, and checks if it's even È.

I did something similar but to get counts of 1 I used S to make it a list and O to sum the list: bSOÈ

Forth (gforth), 41 bytes
: f 1 swap 63 for 0 d2* m+ next + 2 mod ;

Try it online!
A function with signature ( u -- 0-or-1 ), that is, one that takes a cell-sized integer from the stack and gives a 0 (not evil) or 1 (evil) on the stack. gforth's native boolean is -1 (true) and 0 (false), but any nonzero value is recognized as true, just like many other languages.
Unlike the answer to a very similar challenge, the FP trick seems to fail to save bytes here.
How it works
: f ( u -- 0-or-1 ) \ Declare function f
  1 swap 63 for     \ Store a 1 under u, and loop 64 times ( 1 u )
                    \ The 1 is bit-count + 1
    0               \   Push a 0 (i.e. cast to unsigned double-cell int)
    d2*             \   Shift double-cell int left once ( 1 u' 0-or-1 )
                    \   In effect, shift MSB of u into the top
    m+              \   Add double [1 u'] and single [0-or-1]
                    \   In effect, add the bit to the bit-count
  next              \ End loop ( bc+1 0 )
  + 2 mod           \ Remove the dummy 0 at the top, and take modulo 2
;

Arn, 8 bytes
›1¢|▬║~Ô

Explained
Unpacked: !(+\(:_b%2
! Boolean not
  ( Expression
    +\ Fold with addition
      ( Expression
        :_ Format implicit variable _ (initialized as stdin)...
          b ... to binary
        %2 Modulo 2
      ) Implicit, can be removed
  ) Implicit, can be removed

Scala, 24 bytes
_.toBinaryString.sum%2<1

Try it online!

Husk, 5 4 bytes
¬F≠ḋ

Try it online!
-1 byte from Jo King.

tinylisp, 47 bytes
(load library)
(d E(q((N)(even?(sum(to-base 2 N

Try it online!
Straightforward solution, thanks to useful library functions.

Python 3.10, 25 bytes
lambda x:~x.bit_count()%2

It's the same number of char that Lynn's answer but with a totally "new idea".
The .bit_count() is new in Python 3.10 and returns the number of 1.
So with that, you can make it 25 bytes.
Note: I can't put a "Try It Online" because their version of Python is 3.7.8
But thank's to @pxeger's comment:
 You can test the code here

Welcome to Code Golf, and nice answer!

My TIO alternative, ATO, has Python 3.10

Wolfram Language (Mathematica), 27 bytes
This is my first ever post on code golf, and I am doing this mostly to hone my Mathematica skills. Any suggestions are greatly appreciated!
2∣Tr[IntegerDigits[#,2]]&

Try it online!
This works by checking the parity of the base-2 digit sum (also called the digital sum). The method is slightly different than the other Mathematica answers.
Edit: I was able to save three bytes by changing Total -> Tr. This was found in the tips page suggested in the comments.

Welcome to Code Golf, and nice first answer! Be sure to check out our Tips for Golfing in Mathematica page for further ways you may be able to golf your code!

Thank you for the tips page. I was not aware of that.

Flobnar, 22 bytes
> +
|\<:
:&%!@
/<2
2 :

Try it online!
<
%!@   Output 1 if the result of `<` is divisible by 2, 0 otherwise...
2

 \    Recursive call:
:&    set current value to input value, or
/<    the previous value divided by 2
2

   :
 > +
:| <  If the current value is 0, return current (0);
 :    otherwise add the current value to the result of recursive call

Haskell, 37 bytes
f n=even.sum$mapM(pure[0,1])[1..n]!!n

Try it online!

Common Lisp, 30 bytes
(lambda(x)(evenp(logcount x)))

Try it online!

><>, 28 22 bytes
-6 bytes thanks to Jo King
:?!v:2%:@-$?:2,
%2l<;n

Code: 22 bytes
Input: put onto the stack using the -v command line argument
Output: 0 means not evil, 1 means evil
Try it online!
Pseudocode
This is a highly abstracted summary of what the program does.
The interpreter puts the input value into n at startup.
l := 1

while n ≠ 0 do:
  m := n mod 2
  if m ≠ 0 then:
    l := l + 1
  n := (n - m) / 2

print l mod 2

brainfuck, 104 bytes
+>,[++++>-[<->-----],]<[[-[[<]<]++++++++++<]<<[<,+<]++[->>]>,>[<<]>[>]<]<<<+[<[-<<+>>]<]<+[[<]++[->]<]<.

Try it online!
Outputs a null byte for false, 0x1 for true. Uses the convert to binary trick twice, once to get the sum of binary digits and the other to check if that number is even or odd by getting the last binary digit.

Jelly, 4 bytes
BS2ḍ

Try it online!

Yabasic, 81 bytes
Input""n
s$=Bin$(n)
v=1
For i=1To Len(s$)
If Mid$(s$,i,1)="1"Then v=!v Fi
Next
?v

Try it online!

Charcoal, 7 bytes
§10Σ↨Ｎ²

Try it online! Link is to verbose version of code. Explanation:
     Ｎ  Input number
    ↨ ² Convert to base 2
   Σ    Sum of digits
§10     Cyclically index into literal string `10`
        Implicitly print

Chip, 22 bytes
 ABCDEFGHe
a{{{{{{{{*f

Try it online!
Chip works in bytes, so each byte of input here is treated independently (which makes for easy test suites). The first byte is ASCII 7 (decimal 55), then 96 -> 99 and 64 -> 67.
This simply XOR's all the input bits, A-H, together (with an extra 1 to invert the result), and sets the low output bit, a, to the outcome. Output bits e and f are also set, making the program output be ASCII 0 for not-evil, and ASCII 1 for evil.
The right-to-left XOR's ({) can be replaced by right-to-left half adders (@) for the same result.

Interesting language. It looks like the input is treated as 7-bit ASCII, so you can probably save 2 bytes by removing H and its corresponding {.

@sundar Thanks! Input is easily given as ASCII, but it actually just sees raw bytes. Any control characters, or values above 0x7f are had to express in TIO, but they do work just fine. For example, the unicode smile face is treated as the three independent bytes.

Ah, it looks like the input characters (at least on TIO) are treated as their UTF-8 encoded bytes. Then I guess the non-terminal bytes can have their high bit set. Just curious, since you said "hard to express in TIO", is there a way to input values above 0x7f by themselves on a local interpreter? On TIO it seems possible only as part of a multibyte character (for eg., to enter 0xe4, I have to input 䀀 (UTF-8 bytes 0xe4, 0x80, 0x80) and ignore the last two outputs).

The input scheme is quite beyond the point of the language, so sorry if this seems like bikeshedding, but it seems like an extended ASCII code like ISO-8859-1 (/Windows 1252) would make more sense for input for this language, making it easier to input byte values and allowing all byte values in input (for eg. I think the current method can't take 255 as input, since bytes with values 245 - 255 are not valid UTF-8 bytes in any character).

@sundar No worries! The interpreter just uses a binary input stream, so encoding isn't  even taken into account. On a command line, for example, I usually do something like printf '\xe4' | ./chip [...], though input direct from a file would work too. ASCII, in the case of this example, is purely an external consideration, a way to provide a specific set of bits in a convenient (if incomplete) way.

Oh, and regarding the difficulty in TIO, it doesn't currently interpret escape sequences like \xe4 in any special way. You'd have to do something clever with a heredoc or similar instead.

Makes sense, thanks! I've missed playing around with simple chips and circuits, and this language seems like it captures the feel of that pretty well, so I'll definitely be checking out more of it later.

Bash, 97 64 42 39 Bytes
Thanks ilkkachu
(($(bc<<<obase=2\;$1|tr -d 0|wc -c)%2))

Try it online!

Welcome to code-golf!  There is quite a lot you can do here to shorten this - dc expressions are generally shorter than bc - returning True/False in a shell return code is OK - no need to do && echo false || echo true.  Here is my shell answer.  Some good tips here

@DigitalTrauma: Thanks.  I shortened it up some, still not as short as yours though.

Doesn't that give an inverted return code? (Considering the common shell custom that zero is truthy) You could save one character by escaping just the semicolon, and a couple by replacing the variable with wc -c: (($(bc<<<obase=2\;$1|tr -d 0|wc -c)%2)) (That also changes the return value so it returns 0 for even number of ones).

EXCEL, 106 bytes
applied Sir Taosique's answer to handle larger numbers.
=ISEVEN(LEN(SUBSTITUTE(DEC2BIN(MOD(QUOTIENT(A1,256^1),256),8)&DEC2BIN(MOD(QUOTIENT(A1,256^0),256),8),0,)))

Brachylog, 5 bytes
ḃ+%₂0

Try it online!
Explanation
ḃ       Take the binary representation of the input
 +      Sum the digits
  %₂0   This sum modulo 2 is 0

Pari/GP, 21 bytes
n->1-sumdigits(n,2)%2

Try it online!

+1. Beats the faster n->1-hammingweight(n)%2.

Perl 5, 33 bytes
sub e{pop=~//;$'?$'%2!=e($'/2):1}

Try it online!
Different approach, one byte longer:
sub e{(grep$_[0]&2**$_,0..31)%2^1}

perl -E, 39 bytes
say!((unpack"b*",pack I,pop)=~y/1/1/%2)

Befunge-93, 23 bytes
&#2:_v#:/
v#:\+<_
_2%.@

Try it online!
Outputs 1 for non-evil, 0 for evil numbers. Calculates the parity of the sum of n divided by 2 repeatedly.

Rust, 24 bytes
|x:u64|!x.count_ones()%2

Try it online!

Pyt, 5 4 bytes
Ħ⁺2%

Try it online!
Explanation:
      Implicit input
Ħ     Convert into binary and count the 1s
 ⁺    Increment
  2%  Mod 2

K (oK), 13 12 bytes
-1 byte thanks to ngn
~2!+/(99#2)\

Try it online!

0= -> ~

PowerShell, 55 52 bytes
-3 bytes thanks to @mazzy
1-([Convert]::ToString("$args",2)-replace0).Length%2

Try it online!
Takes input as an integer from a command-line parameter.

:) Try it online!

PowerShell, 44 bytes
param($n)for(;$n;$n=$n-shr1){$e+=$n%2}1-$e%2

Try it online!
Straightforward counting.

Brain-Flak, 76 bytes
{({<([()]{})>{(<([()]{})>)()}{}}<(()[[]]{}){<>([(){}])(<><{}>)}{}>)}<>({}())

Try it online!
Explanation
{
  ({ Divide by two
    <([()]{})>
    {(<([()]{})>)()}{}
  }
  # Invert other side if 1 is the next digit
  <(()[[]]{}){<>([(){}])(<><{}>)}{}>)
}
<>({}()) # Process output

APL(NARS), 29 chars, 58 bytes
{⍵≤0:0⋄∼2∣+/{(2⍴⍨⌊1+2⍟⍵)⊤⍵}⍵}

test:
  f←{⍵≤0:0⋄∼2∣+/{(2⍴⍨⌊1+2⍟⍵)⊤⍵}⍵}
  f 3
1
  f 11
0
  f 777
1

ink, 53 bytes
=e(n)
~temp o=0
-(i)~o+=n%2
~n=n/2
{n:->i}{1-o%2}->->

Try it online!
Counts bits.

GolfScript, 13 bytes
2 base{+}*2%!

Try it online!
This can't really be golfed much harder in this language, I don't believe. Maybe a character somewhere? But you absolutely need to use "2 base", and that takes up half the program, which stinks. I did find a second, different solution though -
2 base[1]/,2%

Try it online!
Here's the explanation for both;
2 base        #Convert into binary
#--------------------------#
      {+}*    #Add up all the 1s and 0s
          2%  #Mod 2
            ! #If even, make 1. If odd, make 0.
#--------------------------#
      [1]/    #Divide the binary across the 1s, this leaves 1 more array than the number of 1s
          ,   #Count the off-by-one array
           2% #If it mods to 1, it's even (because off by one), if not, it's 0. Neat!

If I could say "0 is truthy, and 1 is falsy", then I could save a character on the first one, but that would just be silly!

This gives an error for input 0

Works fine for me - are you putting it in "input" or "header"? Header is where GS takes in input - straight into the stack.

That was the issue.

05AB1E, 4 bytes
bSOÈ

Explanation:
bS    # Takes the input and coverts it into a list of binary digits
  O   # Sums all of the digits in this list
   È  # Checks if the sum is even

Try it online!

Exact duplicate of Kevin's answer.

Python 3, 30 bytes
lambda n:bin(n).count('1')%2<1

Try it online!
Thanks to @Stephen for saving a byte!

You can save a byte with <1 instead of ==0.

...lambda n:~bin(n).count('1')%2 would save one more (still not gonna beat lambda n:int(bin(n),13)%2 though :))

You can also do lambda x:~x.bit_count()%2 which is shorter

Java, 29 28 26 64 63 49bytes
static boolean c(int r){return r==0||c(r*2)^r<0;}

Try it online!
Seems to work. Nice bit of recursion. It'd be 26 25 23 if I could rename the outer class. Perhaps get a better reference to itself.
Old and boring saves 14 bytes, by Jo King. (If you really want traditional and do-it-by-hand r->0<((r=(r=(r=(r^=r<<16)^r<<8)^r<<4)^r*4)^r*2) for 47 (may have the odd byte of flab).

@JoKing I don't have a knowledge of all the meta posts the rules are covered on.

C(GCC, clang), 33 bytes
f(n){return!__builtin_parity(n);}

Uses a compiler builtin, and as such works only with GCC and clang and whatever other compiler that implements it. Appears to work with all optimization settings.
Try it online! - GCC
Try it online! - clang

You can abuse GCC's register placement to avoid the return (see this tip): Try it online!

Golfscript, 13 bytes
~2base{},,2%!

Try it online!
~: turn input string into an integer
2base: turn top of stack into base two (represented by an array of 1s and 0s)
{},: filter out all 0s; the , command consumes the array and a code block ({}) and pushes an array containing only the elements for which the codeblock evaluates positivly (the 1s)
,: the top of stack is an array, so , consumes the array and pushes the length of the array
2%!: push 2, get the modulus(%) of the length and 2, and invert(!) the result
when the program halts, the stack is dumped into stdout, this results in either 1 for true or 0 for false

Desmos, 251 201 197 178 79 bytes
Wow... Coming back to this after months, and finding the most obvious golfs... lol
a=[0,...floor(\log_2N)]
f(N)=\{\mod(\total(\floor(\mod(N,2^a2)/2^a)),2)=0:1,0\}

Try It On Desmos!
Try It On Desmos! - Prettified

u dont need the comma before ...

and u can call \total with dot notation

Rust, 21 bytes
|n|n.count_ones()%2<1

Try it online!
Nothing fancy going on here, just counting the ones of the input then checking if it is even.

Vyxal, 10 3 bytes
b∑₂

Try it Online!
b∑  # Sum of binary digits
  ₂ # Is even?

3 bytes

MMIX, 12 bytes (3 instrs)
00000000: db000000 7f000001 f8010000           ṃ¡¡¡¶¡¡¢ẏ¢¡¡

isevil  SADD $0,$0,0
        ZSEV $0,$0,1
        POP  1,0

Factor, 19 bytes
[ bit-count even? ]

Try it online!
Should be self-explanatory, I hope.

tfw not a native english speaker

Pyth, 10 bytes
!%/.BQ"1"2

Try it online!
Trying to learn Pyth, so this is my go at it.
How it works:
Convert the input to binary, count the number of "1"s, check whether they're even, invert the output (so it checks whether they're odd. In more detail:
!                 # negate output (0 -> 1, 1 -> 0)
    %             # check whether the following block returns an even number
        /         # count string occurences in...
            .B    # ...the binary string version of...
                Q # ...the input
            "1"   # the string 1; the string to be count the occurences of
    2             # the 2 used by the modulo parity check

Fig, \$3\log_{256}(96)\approx\$ 2.469 bytes
OSb

Try it online!
Outputs using inverted truthiness (0 -> true, 1 -> false) because of a bug with E.
OSb
  b # To binary
 S  # Sum
O   # Is odd?

Pip, 8 bytes
%(1NTBa)

Attempt This Online!
Outputs 0 for truthy and 1 for falsy.
Pip, 9 bytes
!%(1NTBa)

Attempt This Online!
Outputs 1 for truthy and 0 for falsy.
Explanation
     TBa   # Convert input to binary
   1N      # Count 1s
 %(     )  # Mod 2
!          # Logical not

6 bytes (or 7 with 1 for truthy and 0 for falsey)

Thunno 2, 4 bytes
ḃ1cE

Attempt This Online!
Explanation: Is the count of 1s in the ḃinary representation Even?

Nekomata + -e, 3 bytes
Ƃ∑½

Attempt This Online!
Ƃ∑½
Ƃ       Binary digits
 ∑      Sum
  ½     Check if it is even

Pyth, 10 bytes
!%/jQ2 1 2
assign('Q',eval_input())
imp_print(Pnot(mod(div(join(Q,2),(1)),(2))))

Simply converts a given input to binary as a list, and prints the logical not of the modulo 2 for the amount of 1's in that list.

Swift, 62 55 54 53 34 bytes
let e={($0+0).nonzeroBitCount%2<1}

Nothing particularly interesting here.

Vyxal, 18 bitsv2, 2.25 bytes
b∑₂

Try it Online!
Bitstring:
011100101011110000

Vyxal 3, 3 bytes
b∑e

Try it Online! (link is to literate version)

Google Sheets, 39 bytes
=ISEVEN(LEN(SUBSTITUTE(BASE(A1,2),0,)))

The formula converts the number to base 2, removes all the zeros and checks if the LEN of the resulting string is even.

You have the same issue that I found, in that 0 returns a true value.

@ShaunBebbington, isn't that the expected result? 0 in binary representation is 0. So it has 0 1s. And 0 is an even number.

Yes, that's how I read it too.

Easyfuck, 23 19 17 bytes

Ì£î␅␏MW¼R¥␕¼×_f|µ8

due to lack of unicode representations for c1 control characters, they have been replaced by their superscripted abbreviations
Decompressed:
f(}`(>+<))"[f]>f>-'

Explanation:
f(       )           declares function f
  }`(   )            right shifts byte at pointer and if the lost bit was a 1, it executes a lambda
      >+<            increments the byte to the right of the pointer
           "         takes in a 16 bit integer and XORs its bytes bitwise
            [f]>f>   runs f until the byte at the pointer is 0, then runs f once on the byte to the right
                  -' decrements the byte once to flip its truthiness (0->255, 1->0)

dc, 27 bytes
0sb[2~lb+sbd1<a]dsaxlb1++2%

Try it online!
Instead of accumulating the bits in register b, we can also leave them on the stack (replace lb+sb by r) which essentially converts the input to binary, push 1, sum the stack and do the mod 2. But it's the same byte-count:
[2~rd1<a]dsax1[+z1<a]dsax2%

Try it online!
Explanation
Register b = 0, divmod on ToS, add remainder to b and loop until ToS is less or equal to 1, then compute ToS + b + 1 mod 2:
0sb[2~lb+sbd1<a]dsaxlb1++2%  # example input 5                     |  stack
0sb                          # initialize register b with 0        |  5
   [2~lb+sbd1<a]             # push the string [..]                |  [2~lb+sbd1<a]
                dsa          # duplicate & store it to register a  |  [2~lb+sbd1<a]
                   x         # execute the string*                 |  1
                    lb       # push register b                     |  1 1
                      1+     # increment by 1                      |  2 1
                        +    # add                                 |  3
                         2%  # modulo 2                            |  1

# Recursively called string:
2~lb+sbd1<a  # recursively called string   |  5
2~           # divmod 2                    |  1 2
  lb         # push register b             |  0 1 2
    +        # add                         |  1 2
     sb      # store register b            |  2
       d     # duplicate                   |  2 2
        1<   # if top (popped) is > 1:
          a  # | execute register a        |  2

Python 3, 69 53 39 bytes
print(bin(int(input())).count('1')%2<1)

Works by using the built in python binary to converter, bin(), on the input, then counts the number of ones in there, checks if it is equal to 0 mod 2, and prints the result (outputs True/False).
Probably needs some more golfing, but this was my first whirl.
Try it online!

You can't assume inputs preassigned to a variable, though you can use a lambda: lambda x:1if len([i for i in bin(x)[2:]if i=='0'])%2==0else 0 which is shorter anyways (I included some basic golfing).

Some more golfing on your approach (using that b has a higher ascii-codepoint than '0') leaves you with: lambda x:len([1for i in bin(x)if'0'<i])%2

@OMᗺ you should probably post that as your own answer, as it's such a better approach than mine. I'd feel bad taking credit for it =)

I won't - there are already shorter ones, but your submission still uses a preassigned variable as input which is not allowed.

@OMᗺ fixed by switching to input()

@JoKing thank you, I have done so.

Scala, 39 bytes
readInt.toBinaryString.count('1'==)%2<1

Try it online
This can be run in a Scala console, after which the user has to input the integer and press enter.

Welcome to PPCG!

This submission seems to be a snippet which is disallowed. Please change your submission to either a full program or a function definition.

Also, could you please make the title of your answer into a header (i.e. # Scala, 34 bytes) to fix the scoreboard?

@JonathanFrech I updated my answer, it now reads the input from user input, and is executable from the Scala console, or as a Scala script

Stacked, 15 bytes
[bits sum 2%0=]

Try it online!
Checks whether or not the sum of the bits of the input mod 2 (2%) is 0 (0=).

C# (.NET Core), 58 bytes
n=>System.Convert.ToString(n,2).Replace("0","").Length%2<1

Try it online!
I could do something similar to the Java answer with
n=>System.Convert.ToString(n,2).Sum(c=>c)%2<1

That's 45 bytes but then I would need to add another 18 for using System.Linq;. So I needed to find another approach.

Red, 57 bytes
func[n][s: on until[if n % 2 = 1[s: not s]1 > n: n / 2]s]

Try it online!

SAS, 35 bytes
e=1-mod(count(put(i,binary.),1),2);

This expression takes a variable i as input and populates the result in a new variable, e. It relies on implicit conversion from character to numeric when specifying which digit to count.

MATLAB 31 bytes
Anonymous function, use as f=@(n)...;f(3)
@(n)1-mod(sum(dec2bin(n)-48),2)

CJam, 15 10 bytes
qi2b1e=2%!

Try it online!
Explanation
qi2b1e=2%! %whole code
qi         %Read input as number | Example stack: 10
  2b       %Convert to binary    | Example stack: 1010
    1e=    %Count ones           | Example stack: 22
       2%  %Mod 2                | Example stack: 0
         ! %Invert               | Example stack: 1

Math++, 40 bytes
?>a
3+3*!a>$
b+a%2>b
_(a/2)>a
2>$
!(b%2)

Scala, 43 41 bytes
def e(n:Int):Int=if(n>0)n%2^e(n/2)else 1

Test: https://scalafiddle.io/sf/VlU7nun/2

Could you please add a comma after Scala in the title of your answer so it doesn't break the scoreboard?

Python 2, 46 bytes
lambda n:sum(int(d)for d in str(bin(n))[2:])%2

Outputs 1 for True or 0 for false

You don't need to stringify the binary

AsciiDots, 86 64 bytes
/{&}\
|(*)?#-.
*{>}:@1({+}*@:-{%}$#&
*{+}\#1/.^-/.-#2/
\-*.<#1)

Returns 1 if the number is evil, otherwise 0. Try it online!

Pascal (FPC), 84 bytes
var n,s:word;begin read(n);repeat s:=n mod 2xor s;n:=n div 2until n=0;write(s=0)end.

Try it online!
No conversion to binary :(

Gol><>, 14 bytes
IW2SD@+$|~2%zh

Try it online!
Explanation:
IW2SD@+$|~2%zh  //Program for reference

I               //Input a integer
 W              //Loop until the number given is 0 (due to the int div 2 inside the loop)
  2SD           //  Push the div and mod of the remaining number by 2
     @          //  Rotate the top three elements on the stack (stack now is: curNumber/2, lastBitSet, bitCount)
      +         //  Add the bit count and the last bit flag
       $|       //  Swap the bitCount with the curNumer/2 and repeat until curNumber/2 == 0
         ~      //Remove the loop exit flag (0)
          2%zh  //Check wether the bitCount is even, output & exit: 1 == truthy, 0 == falsy

GolfScript, 14 bytes
2base{^}*!

Try it online!
Explanation:
2base         convert input to binary
     {^}*     xor all bits
         !    flip answer

This appears to be only 10 bytes

chevron, 45 bytes
method borrowed from Lynn's python answer.
>:>^n
^n,10,2~x>>^n
b^n,13~x>>^n
^n%2>>^n
>^n

notes:

outputs :0 for falsy and :1 for truthy.
online interpreter defaults to printing the input at prompts, uncheck "print inp" to disable.
replace : with ^__ for no prompt.

GolfScript, 11 bytes
~2base{^}*!

Try it online!
~2base        # Convert to binary
      {^}*    # Xor all the numbers in the array
          !   # Negate the output

PHP 7.4, 65 bytes
Input is given in $n
echo array_reduce(str_split(decbin($n)),fn($c,$i) => $i xor$c,1);

or prior to PHP 7.4: 76 bytes
echo array_reduce(str_split(decbin($n)),function($c,$i){return$i xor$c;},1);

Try it online
Ungolfed
echo array_reduce(
    str_split(decbin($n)),
    function ($c,$i) {
        return $i xor $c;
    },
1);

PowerShell, 70 bytes
if(([convert]::tostring($args[0],2)-replace"0","").length%2){0}else{1}

Try it online!
Sorry don't know if any powershell solution is posted, if so, I am ready to delete my submission.

Python 3, 34 bytes
lambda n:not f"{n:b}".count("1")&1

Try it online!

You can do lambda x:~x.bit_count()%2

Python, 34 bytes
lambda x:not bin(x).count('1')%2

Converts input to bin, then counts 1s, mod 2 (invert because of even=1)
Try it online (Python 3.8.0b4)
Try it online (OLD) (Python 3.8.0b4)

This looks like a snippet which just evaluates to the answer, which isn't one of our allowed output methods. You'd need to include print() around the expression in your answer, or convert your answer to a function, like lambda x:not bin(x).count('1')%2

You can do lambda x:~x.bit_count()%2

Swift, 24 bytes
{$0.nonzeroBitCount%2<1}

Try it online
Type information not included, since the argument can be any FixedWidthInteger. For example, all of the following are valid:
let f: (Int) -> Bool = {$0.nonzeroBitCount%2<1}
let g: (UInt64) -> Bool = {$0.nonzeroBitCount%2<1}
let h: (CChar) -> Bool = {$0.nonzeroBitCount%2<1}

Unlike many other C-family languages, integers cannot implicitly be converted into booleans, and characters cannot be implicitly converted to numbers, so the approaches taken by the top C++ and C# answers are too verbose.

Arturo, 26 bytes
$=>[0=%∑digits.base:2&2]

Try it

CJam, 7 bytes
2b{^}*!

Try it online!
Port of this GolfScript answer, go upvote that!

Uiua, 6 3 bytes
/=⋯

Try it!
/=⋯
  ⋯  # bits
/=   # reduce by equality

Go, 62 bytes
import."math/bits"
func f(n uint)bool{return OnesCount(n)%2<1}

Attempt This Online!
Uses the bits.OnesCount builtin.

Python 3, 34 bytes
lambda n:not f"{n:b}".count("1")&1

Try it online!

Perl 5, 28 + 1 = 29 bytes
Added one byte for -p as per the scoring system when the question was asked.
$_=(sprintf"%b",$_)=~y/1//%2

Try it online!
Outputs 0 for evil, 1 for not evil.

Commodore BASIC V2 (Commodore C64/VIC-20 and C128 in 64 mode, THEC64/THEC64 Mini, and some CBM/PET models) ~75 BASIC bytes
This listing should handle positive integers between 0 and 2147483647 inclusive, and meets all test conditions.
0 INPUTY:C=2^21:U=.
1 U=U-(Y>=C):Y=Y+(Y>=C)*C:C=C/2:ON-(C>=1)GOTO1:PRINT.=(UAND1)

Some notes: there is no error handling, nor does it check for integer-only numbers, so you may enter 3.14 and it will treat this as if you entered 3. Also, using this method, entering 0 will show -1 which in Commodore BASIC is true. I guess binary 0 has an even number of 1s in its binary representation, as zero is even, and binary 0 has zero ones.
Where you see . this is a BASIC equivalent of 0, but it is parsed faster by the interpreter.


text:
What associativity was it again
Non-associative operators (for example the subtraction-operator) often are either left- or right associative, such that one has to write less parentheses. Consider for example the following:
$$
a-b-c
$$
Probably everybody read that as \$(a-b)-c\$, by default (usually) subtraction is left-associative.
Now let us consider some operation \$\diamond: X \times X \to X\$, the only thing we know about it is that it is not associative. In this case the following is ambiguous:
$$
a \diamond b \diamond c
$$
It could either mean \$(a \diamond b) \diamond c\$ or it could mean \$a \diamond (b \diamond c)\$.
Challenge
Given some possibly parenthesised expression that is ambiguous, your task is to parenthesise it such that there is no ambiguity. You can chooose freely whether the operator should be left- or right associative.
Since there is only one operation the operator is only implied, so for the above example you'll get abc as input. For left-associative you'll output (ab)c and for right-associative you'll output a(bc).
Input / Output

Input will be a string of at least 3 characters

the string is guaranteed to be ambiguous (ie. there are missing parentheses)
you're guaranteed that no single character is isolated (ie. (a)bc or a(bcd)e is invalid input)
the string is guaranteed to only contain alphanumeric ASCII (ie. [0-9], [A-Z] and [a-z]) and parentheses (you may choose (), [] or {})

Output will be a minimally1 parenthesized string that makes the string unambiguous

as with the input you may choose between (), [], {} for the parentheses
output may not contain whitespace/new-lines, except for leading and trailing ones (finite amount)

Test cases
These use () for parentheses, there is a section for each associativity you may choose (ie. left or right):
Left associative
abc -> (ab)c
ab123z -> ((((ab)1)2)3)z
ab(cde)fo(0O) -> ((((ab)((cd)e))f)o)(0O)
(aBC)(dE) -> ((aB)C)(dE)
code(Golf) -> (((co)d)e)(((Go)l)f)
(code)Golf -> ((((((co)d)e)G)o)l)f

Right associative
abc -> a(bc)
ab123z -> a(b(1(2(3z))))
ab(cde)fo(0O) -> a(b((c(de))(f(o(0O)))))
(aBC)(dE) -> (a(BC))(dE)
code(Golf) -> c(o(d(e(G(o(lf))))))
(code)Golf -> (c(o(de)))(G(o(lf)))

1: Meaning removing any pair of parentheses will make it ambiguous. For example a(b(c)) or (a(bc)) are both not minimally parenthesised as they can be written as a(bc) which is not ambiguous.

this reminds me of KebabF***...

Might want to fix the unambious in the second main point in I/O

Retina 0.8.2, 61 bytes
+1`(\(((\()|(?<-3>\))|[^()])+(?(3)$)\)|[^()]){2}(?=[^)])
($&)

Try it online! Link includes test cases. Explanation: I'd really like to use a recursive regex (([^()]|\((?1)\)){2})(?=[^)]) here, but .NET only has balancing groups, so it's a bit verbose.
+1`

Repeatedly replace the first match each time. This ensures left-associativity.
(           Either
 \(          Match outer `(`
 (           Either
  (\()        Capture a `(` into $3
 |           Or
  (?<-3>\))   A `)` if it matched an earlier `(`
 |           Or
  [^()]       Something else
 )+          Match as much of the above as possible
 (?(3)$)     But don't leave `(`s unmatched
 \)          Match outer `)`
|           Or
 [^()]       Match something else
){2}        Match the above twice
(?=[^)])    Followed by a non-`)`

Either, a ( followed by a string containing balanced ()s,  followed by a ), or a non-(), twice, followed by a non-). This represents an ambiguous match.
($&)

Wrap the match in disambiguating parentheses.

JavaScript (ES6), 128 bytes
f=([a,...s],c=q=p="",$=")")=>s[1]?a<$?s.map(t=>c||(t<$?++p:t>$||p--||(c=f(q),q=""))?q+=t:0)&&q?a+c+$+a+f(q)+$:c:a+"("+f(s)+$:a+s

Recognizes () as parentheses, and outputs a right-associative expression. Test cases additionally include nested parentheses.
Try it online!
Explanation
Recursively disambiguates sub-expressions within parentheses given in the input.
To track nesting depth, it increments the variable p upon encountering a left
paren (following the initial opening paren). A right paren decrements the
counter, and if p = 0 prior to decrementing, the function recurs on the
accumulated sub-expression. A quick visual:
(ab(cd(ef)gh)ij)
0  1  2  1  0  = 0, so call function

When handling parentheses in inputs, i.e. the first character is a (, it
partitions the input into the enclosed sub-expression and everything following
the matching paren, e.g. (cd)ef splits into cd, which is fed back into the
function, and ef, both of which are subsequently wrapped in parentheses. If an
enclosed sub-expression has no trailing characters, the result of recurring on
it isn't wrapped in parentheses. (cd)ef -> (cd)(ef) but (cd) -> cd
Ungolfed:
f = (
    [a, ...s],                                       // destructure string, e.g. "abc" => "a", ["b", "c"]
    c = q = p = "",
    $ = ")"
) =>
    s[1] ?                                           // if input length > 2 ...
        a < $                                        //     if first char is ( ...
            ? s.map(t =>
                c                                    //         stores disambiguated sub-expression
                || (                                 //         if sub-expression not yet found...
                        t < $                        //             if char is ( ...
                            ? ++p
                        : t > $
                            || p--                   //             if char is ) and p = 0, e.g. outer closing paren found...
                            || (c = f(q), q = "")    //                 reset q to accumulate characters following the closing paren
                )                                    //         this expression returns a truthy value if should append current char (i.e. if t is not the final closing paren)
                    ? q += t
                    : 0
            )
                && q
                    ? a + c + $ + a + f(q) + $       //         a = "(", guaranteed by the conditional check
                    : c
            : a + "(" + f(s) + $
    : a+s                                            // since s has length 1, appending it simply appends its first value

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes