Tag:Shift right

  • Very simple matrix scanning program of 51 single chip microcomputer

    Time:2020-12-20

    /*Key position definition of key*/ unsigned char code anj[4][4] = { 1, 2, 3, 10, 4, 5, 6, 11, 7, 0, 9, 12, 13, 8, 14, 15, }; char ScanKey() { Char key = – 1; // the assignment is used to judge if the key is not pressed unsigned i,j; for (i = 0;i […]

  • Leetcode double pointer Series 1

    Time:2020-12-12

    15. Sum of three16. The sum of the nearest three numbers18. Sum of four numbers26. Delete duplicate items in sorted array27. Remove elements75. Color classification88. Merge two ordered arrays21. Merge two ordered linked listsAdjust the array order so that the odd number comes before the even number 15. Sum of three Give you an array […]

  • Tetris game automata

    Time:2020-11-25

    Making Tetris with electronFollow up article, intelligent program to play Tetris game. background Not long ago, I completed the basic Tetris game with ES6. Today, I have completed a preliminary intelligent algorithm. I can play Tetris automatically, which makes my idea closer to the realization. design sketch The first run, eliminate 1398 lines, steal joy! […]

  • Creation and merging of branches

    Time:2020-11-5

    Creation and merging of branches Now let’s take a simple example of branching and merging. This workflow is also used in actual work 1. Develop a website.2. To implement a new requirement, create a branch.3. Work on this branch.Suppose you suddenly receive a call saying that there is a very serious problem that needs urgent […]

  • C practical exercises topic 54

    Time:2020-7-30

    Title:Take 4-7 bits from the right end of an integer a. Program analysis:Consider this: (1) First, shift a to the right by 4 bits. (2) Set a number with all the lower 4 bits as 1 and all the others as 0. Use ~ (~ 0 < < 4) (3) Perform the & operation on […]

  • Java operator

    Time:2020-7-8

    Java operator 1、 Operator classification Operator priority Arithmetic operator one yuan ++,– binary +,-,*,/,% Assignment Operators = Extension operator +=,-=,*=,/= Relational operators >,=,<=,instanceof Logical operator &&,||,!,^ Bitwise Operators &,|,~,^,>>,<>> Conditional operator ?: String connector +   2、 Arithmetic operator (1) Unary operator A + +: the variable a is used first and then increased automatically. […]

  • Displacement operation

    Time:2020-6-28

    Original code, inverse code, complement code Signed displacement operation (< and > >Signed displacement operations are divided into < (shift left) and > > (shift right). These two kinds of displacements are for complement operation. Symbol bits are involved in displacement operation. Except for the negative number to fill 1 in the high position, the […]