Given a number (N), program to check whether its binary form has periodic or not



Given a number (N), program to check whether its binary form has periodic or not..

Answer / Kavita Bhasker

To write a program that checks if a given number's binary form has a periodic pattern, follow these steps:
1. Convert the number into binary.
2. Divide the binary representation into segments of equal length (e.g., groups of 4 bits).
3. Compare each segment to its corresponding segment in subsequent divisions. If any two segments are identical, the binary form has a periodic pattern.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Engineering AllOther Interview Questions

What is a PCB?

5 Answers   Country Club,


if your monitor is not started with your cpu, but start when monitor attach to another cpu then where is the problem?

2 Answers  


A character set has 1 and 2 byte characters. One byte characters have 0 as the first bit. You just keep accumulating the characters in a buffer. Suppose at some point the user types a backspace, how can you remove the character efficiently. (Note: You cant store the last character typed because the user can type in arbitrarily many backspaces)

2 Answers   Microsoft,


what is the difference between oracle 8i vs 9i

1 Answers  


what is program data insulation in dbms?

1 Answers   Oracle,


project plan for bug tracking system?

1 Answers  


An integer number is said to be a perfect number if its factors, including 1 but not the number itself, sum to the number. For example, 6 is a perfect number because 6 = 1 + 2 + 3. Write a Java program, which finds and prints all perfect numbers that are less than 1600.

1 Answers  


What is the difference between CD-R and CD+R?

1 Answers   NIIT,


what is the maximum load for MDB, SMDB & DB

1 Answers   Target,


Phong shading refers to describe

1 Answers   NIC,


What is OHNS Material and can anybody explain the Chemical & Physical Properties of Same. Which Technical Standard Book shows this Specification. Why can't we use En series instead of OHNS. Where it is specifically Used.

3 Answers   Advanced Bolting Solutions,


What is Moore's law and what limits the size of a computer chip?

1 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5086)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4453)
  • Electrical Engineering Interview Questions Electrical Engineering (16638)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)