The Binary Numbering System (base-2)

Every machine is an electronic system. in order to communicate with machines, the best way is to via electrical signals. Every electronic machine has a minimum of two signals i.e. “positive” and “negative”. Considering this as fundamental principles computers used binary to build their systems The Binary Numbering System is the most fundamental numbering system in all digital and computer-based systems. a binary number is … Continue reading The Binary Numbering System (base-2)

Binary Numbers – HackerRank Problem solution

Question: Given a base- 10 integer, n, convert it to binary (base-2). Then find and print the base-10 integer denoting the maximum number of consecutive 1’s in n Input: Output: Explanation Sample Case 1:The binary representation of 5 is 101, so the maximum number of consecutive 1’s is 1. Here is original problem from HackerRank Answer: Continue reading Binary Numbers – HackerRank Problem solution