Tag:Shift right

  • CSAPP English Learning Series: Chapter 2: data representation

    Time:2021-10-10

    Series articles: CSAPP English Learning Series: Preface CSAPP English Learning Series: Chapter 1: a tour of computer systems CSAPP English Learning Series: Chapter 2: data representation CSAPP English Learning Series: Chapter 8: exceptional control flow CSAPP English Learning Series: Chapter 11: network programming CSAPP English Learning Series: Chapter 12: concurrent programming Generally speaking, binary operations […]

  • C language – bit operators for the first time. It’s enough to read this article!

    Time:2021-10-6

    In C language, the operation component of bit operation can only be integer or character data. Bit operation regards the operation object as bit string information composed of binary bits, completes the specified operation by bit, and obtains the result of bit string information. The following small series will introduce the usage of bit operators […]

  • Binary, bit operation, displacement operation

    Time:2021-9-15

    Basic concepts of binary Binary is the carry system of every 2 carry, and 0 and 1 are the basic operators. Modern electronic computer technology uses binary, because it only uses two digital symbols: 0 and 1, which is very simple and convenient and easy to be realized electronically. The information processed inside the computer […]

  • Bitwise operators of basic operators in C language (6)

    Time:2021-8-5

    For more compact data, C programs can store information with independent bits or multiple bits combined together. File access permission is a common application case. The bit operator allows processing of independent bits in a byte or larger data unit: any bit or multiple bits can be cleared, set, or inverted. You can also move […]

  • 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 […]