answersLogoWhite

0


Best Answer

If you're using C, just check the low order bit. In binary, the low order bit of an odd number is 1, and the low order bit of an even number is 0.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is logic to find the even and odd no without use of modulus and division?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the modulus used for in programming?

The modulus operator (%) is used to return the partial value that remains when the first operand is divided by the second. If you recall learning long division, most systems start with a "remainder" that is a whole number rather than a decimal point. The modulus returns this value. For example 10 % 3 means "Take the number ten and find the nearest full division of 3, which in this case would be 9 (3 * 3). Then take that number, and subtract it from the original number, 10." You see modulus used a lot to determine whether a number is even or odd. This for loop (written in PHP) will produce HTML table rows, with the even rows give the class of "even." <?php $rowset = ''; $set = array ( 'a', 'b', 'c', 'd', 'e', 'f', 'g' ); for ( $i = 1; $i <= count ( $set ); $i++ ) { if ( $i % 2 == 0 0 { $class = 'class="even"'; }else{ $class = ''; } $rowset .= '<tr '.$class.'><td>'.$set[$i].'</td></tr>'; } echo $rowset;


What is even numbers chart?

an even numbers are numbers that can be division by 2 without a remainder


Why NOR gate is called universal gate?

That title of "Universal Gate" is reserved for NAND gates because you can build all possible logic using only NAND logic . You can build even other basic logic like AND, OR and NOT using NAND.


What is the bad logic type of propaganda?

Bad logic is a type of propaganda in which someone uses horrible logic to support something or gain support for something even if it makes no sense whatsoever.


How do you generate even numbers using do while statement?

1) to make a number even, multiply it by an even number. So you could use a randum number and double it.2) to test if a number if even, if ( i modulus 2 == 0 ) then it is even.


Why use Logic based encoders?

Logic based encoders ensure that the transmitted data is safely sent. Even when intervened by third party, decoding logic is necessary to understand the data sent.


What is a tdma?

Time Division Multiple Access. Or even Time Division Multiplexed Access.


How could you perform a subtraction and division from number 7 without using a odd number and the result is even?

(7 - 2)/0.5 = 10 Neither 2 nor 0.5 are odd numbers, but 10 is even.


why is the division of odd and even uncertain?

It is different.


Is the set of even integers closed under subtraction and division?

Subtraction: Yes. Division: No. 2/4 = is not an integer, let alone an even integer.


What is gender division?

gender division is the division among people on the basis of race, sex, birth, rich, poor and even on the choice of the people.


How do you use logic in daily life?

Logic is the process of deciding what to do, whether because it is necessary or right. As such, you use logic every time you make a decision (even subconciously) such as what you will have for breakfast or dinner, whether you will watch this programme or that one, etc.