We’re rewarding the question askers & reputations are being recalculated! Read more.
3 added 163 characters in body
source | link

MATL, 75 bytes

3X2Z%Bz3Z%Bz

Try it online!Try it online!

Exact transliteration of my MATLAB answer. Note that input and output are implicit. -2 bytes thanks to Luis Mendo.

3X2 % Literal 'int64'
Z%3Z%   % Typecast: changes input (implicitly taken and converted to double) to 64 bit intuint64 without changing underlying bits
B     % Convert integer to array of 1s and 0s
z     % Count nonzero entries

MATL, 7 bytes

3X2Z%Bz

Try it online!

Exact transliteration of my MATLAB answer. Note that input and output are implicit.

3X2 % Literal 'int64'
Z%   % Typecast: changes input (implicitly taken and converted to double) to 64 bit int without changing underlying bits
B     % Convert integer to array of 1s and 0s
z     % Count nonzero entries

MATL, 5 bytes

3Z%Bz

Try it online!

Exact transliteration of my MATLAB answer. Note that input and output are implicit. -2 bytes thanks to Luis Mendo.

3Z%   % Typecast: changes input (implicitly taken and converted to double) to uint64 without changing underlying bits
B     % Convert integer to array of 1s and 0s
z     % Count nonzero entries
2 added 241 characters in body
source | link

MATL, 7 bytes

3X2Z%Bz

Try it online!

Exact transliteration of my MATLAB answer. Note that input and output are implicit.

3X2 % Literal 'int64'
Z%   % Typecast: changes input (implicitly taken and converted to double) to 64 bit int without changing underlying bits
B     % Convert integer to array of 1s and 0s
z     % Count nonzero entries

MATL, 7 bytes

3X2Z%Bz

Try it online!

Exact transliteration of my MATLAB answer. Note that input and output are implicit.

MATL, 7 bytes

3X2Z%Bz

Try it online!

Exact transliteration of my MATLAB answer. Note that input and output are implicit.

3X2 % Literal 'int64'
Z%   % Typecast: changes input (implicitly taken and converted to double) to 64 bit int without changing underlying bits
B     % Convert integer to array of 1s and 0s
z     % Count nonzero entries
1
source | link

MATL, 7 bytes

3X2Z%Bz

Try it online!

Exact transliteration of my MATLAB answer. Note that input and output are implicit.