Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
5 fixed grammar and formatting
source | link

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

Write some statement(s) which will count the number of ones in an unsigned sixteen bit-bit integer.

For example, if a variablethe input is s = 1337, then set ones tothe result is 6 because 1337 as a sixteen bit binary number is 0000010100111001, which contains six ones.

Count the number of ones in unsigned 16 bit integer

Write some statement(s) which will count the number of ones in an unsigned sixteen bit integer.

For example, if a variable s = 1337, then set ones to 6 because 1337 as a sixteen bit binary number is 0000010100111001, which contains six ones.

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

Write some statement(s) which will count the number of ones in an unsigned sixteen-bit integer.

For example, if the input is 1337, then the result is 6 because 1337 as a sixteen bit binary number is 0000010100111001, which contains six ones.

    Question Protected by Community
    Tweeted twitter.com/#!/StackCodeGolf/status/578399220081778688
    Post Reopened by TheNumberOne, Martin Ender code-golf
    Post Closed as "duplicate" by Paul R, NinjaBearMonkey, Optimizer, ProgramFOX, ugoren of
4 deleted 5 characters in body
source | link

Write some statement(s) in C which will count the number of ones in an unsigned sixteen bit integer.

For example, if a variable s = 1337, then set ones to 6 because 1337 as a sixteen bit binary number is 0000010100111001, which contains six ones.

Write some statement(s) in C which will count the number of ones in an unsigned sixteen bit integer.

For example, if a variable s = 1337, then set ones to 6 because 1337 as a sixteen bit binary number is 0000010100111001, which contains six ones.

Write some statement(s) which will count the number of ones in an unsigned sixteen bit integer.

For example, if a variable s = 1337, then set ones to 6 because 1337 as a sixteen bit binary number is 0000010100111001, which contains six ones.

3 deleted 11 characters in body
source | link

Write some statement(s) in C which will count the number of ones in aan unsigned sixteen bit integer when represented as binary.

For example, if a variable s = 1337, then set ones to 6 because 1337 as a sixteen bit binary number is 0000101001110010000010100111001, which contains six ones.

Write some statement(s) which will count the number of ones in a sixteen bit integer when represented as binary.

For example, if a variable s = 1337, then set ones to 6 because 1337 as a sixteen bit binary number is 000010100111001, which contains six ones.

Write some statement(s) in C which will count the number of ones in an unsigned sixteen bit integer.

For example, if a variable s = 1337, then set ones to 6 because 1337 as a sixteen bit binary number is 0000010100111001, which contains six ones.

2 edited tags
| link
1
source | link