Introduction to MCU's logic circuit and logic operation

Publisher:码字狂人Latest update time:2020-06-07 Source: elecfansKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In digital circuits, we often encounter logic circuits, and in C language, we often use logical operations. The two are interrelated in principle.


First of all, within the concept of "logic", there are two logical values, true and false. When corresponding to digital circuits or C language, they become "non-zero value" and "0 value", that is, logically "false" is the value "0" in digital circuits or C language, and logically "true" is all other "non-zero values".


Then, let's analyze several major logical operators in detail. We assume that there are two byte variables: A and B, and the result of a certain logical operation between the two is F.


The following logical operators are all operated according to the overall value of the variable, and are usually called logical operators:

The following logical operators are all operated on each bit in the variable, and are usually called bitwise operators:

When we look at materials or chip manuals in the future, we will often encounter some circuit symbols. Figure 5-1 shows the commonly used symbols in digital circuits. Knowing these symbols will help us understand the logical structure of the device, especially the popular foreign graphic symbols in Figure 5-1. Let's take a quick look here. If you encounter them in the future, you can check them here.

Figure 5-1 Logic circuit symbol

Keywords:MCU Reference address:Introduction to MCU's logic circuit and logic operation

Previous article:Development process of single chip microcomputer application system
Next article:STM8 programming

Recommended ReadingLatest update time:2024-11-16 12:58

avr+development environment+linux, building of avr microcontroller development environment under win7
Operating system: win7 professional x86 Development software: avr studio 4.19 First, download AVR Studio 4.19, because it seems that this is the last development environment that Atmel officially supports JTAG ICE. And only this version 4 supports Windows 7. I happened to have a JTAG, so I decisively chose this versio
[Microcontroller]
avr+development environment+linux, building of avr microcontroller development environment under win7
Freescale MCU DZ60---SCI (interrupt reception)
#include hidef.h /* for EnableInterrupts macro */ #include "derivative.h" /* include peripheral declarations */ #define LED_D1 PTDD_PTDD0 #define LED_D1_DIR PTDDD_PTDDD0   #define LED_ON 0 #define LED_OFF 1   unsigned char SCANF_SEND_STRINGS = "HELLO MCU WORLD"; unsigned char *pSendString = SCANF_SEND_STRINGS; unsig
[Microcontroller]
Design of digital power supply based on STC12C5410AD microcontroller
    introduction   Digital power is currently mainly used in data communications, storage, servers and other fields with high performance and intelligence requirements. Driven by semiconductor companies such as TI in the United States, digital power technology has developed rapidly.   The industry generally agrees
[Microcontroller]
Design of digital power supply based on STC12C5410AD microcontroller
Long press, short press, double press of the button based on the state machine MCU source program
I learned the program of my predecessors for a while, and then I wrote a simple button program to control the LED light. The microcontroller source program is as follows: #include stc15w202s.h #include stdio.h #define key_state_0 0 #define key_state_1 1 #define key_state_2 2 #define key_state_3 3 #define key_no 0
[Microcontroller]
Independent keyboard of 51 single chip microcomputer
I plan to start watching Guo Tianxiang’s microcontroller videos these days, and I also wrote a 51 microcontroller program with an independent keyboard, using Keil C51 as the development environment. At first glance, the function is not very complicated. The P1^7 port of the 51 single-chip microcomputer is connected to
[Microcontroller]
Three storage spaces and division analysis based on MCS-51 microcontroller
1 Introduction The memory of MCS-51 has three spaces: on-chip RAM, off-chip RAM and ROM. MCS-51 microcontroller has four storage spaces in the physical structure 1. On-chip program memory (on-chip ROM) 2. Off-chip program memory (off-chip ROM) 3. On-chip data memory (on-chip RAM) 4. Off-chip data memory (off-chip
[Microcontroller]
Mouser stocks Microchip PIC32CM Lx MCU with support for both security subsystem and Arm TrustZone technology
Mouser stocks Microchip PIC32CM Lx MCU with support for both security subsystem and Arm TrustZone technology November 16, 2022 – Mouser Electronics, a global authorized distributor of semiconductors and electronic components focused on introducing new products, will now stock Microchip Technology’s PIC32CM LE00,
[Microcontroller]
Mouser stocks Microchip PIC32CM Lx MCU with support for both security subsystem and Arm TrustZone technology
51 MCU Review 001
1. Change the font and keyword color settings of Keil Uvision3: Modify the order as follows 1 Open edit 2 Open edit configuration at the bottom 3 Open colars  4 Select 8051 edit c file to modify the size and keyword coloring issues of the C language. From http://zhidao.baidu.com/question/137561189.html 2. Bit de
[Microcontroller]
51 MCU Review 001
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号