Abstract

in the work we discuss the benefit of using bitwise operations in programming. Some interesting examples in this respect have been shown. What is described in detail is an algorithm for sorting an integer array with the substantial use of the bitwise operations. Besides its correctness we strictly prove that the described algorithm works in time O(n). In the work during the realization of each of the examined algorithms we use the apparatus of the object-oriented programming with the syntax and the semantics of the programming language C++

Highlights

  • The use of bitwise operations is a powerful means during programming with the languages C/C++ and Java

  • Some of the strong sides of these programming languages are the possibilities of low level programming

  • Some of the means for this possibility are the introduced standard bitwise operations, with the help of which it is possible to directly operate with every bit of an arbitrary variable situated in the random access memory of the computer

Read more

Summary

INTRODUCTION

The use of bitwise operations is a powerful means during programming with the languages C/C++ and Java. Some of the means for this possibility are the introduced standard bitwise operations, with the help of which it is possible to directly operate with every bit of an arbitrary variable situated in the random access memory of the computer. In the current article we are going to describe some methodical aspects for work with the bitwise operations. As an interesting example of application of the bitwise operations comes the realised by us algorithm for sorting an integer array, for which we strictly prove its correctness and the fact that this algorithm will use operations included in the standard of the programming language C++. A main role in the realisation of the algorithm plays the bitwise operations

BITWISE OPERATIONS
SOME ELEMENTARY EXAMPLES OF USING THE BITWISE OPERATIONS
BITWISE SORTING
PROGRAMME CODE OF THE ALGORITHM
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call