Writing programs in C has nothing to do with how many bits the microcontroller has. If you define an int data, two bytes of memory will be allocated to it. So int data is 16 bits. Unsigned int data is an unsigned integer, and the highest bit does not represent the sign, so it starts from 0000,0000,0000,0000B------1111,1111,1111,1111B. That is, from 0x0000----0xffff. If converted to decimal, it is 0---65535. If it is only int type data, the highest bit represents the sign bit, 0 for positive numbers and 1 for negative numbers. At this time, this data represents from. 0x8000---0x7fff (note that the highest bit is the sign flag bit) After converting to decimal, it is. -32768---+32767. You can refer to standard C language books for the length of other data, for example, a char type data is generally 8 bits. A long int type data is usually 32 bits. And so on. These have nothing to do with the number of bits of the microcontroller itself.
Reference address:What is the length of unsigned int in 8-bit microcontroller?
Previous article:The running process of a program in a single chip microcomputer
Next article:MCU packaging, crystal oscillator circuit
- Popular Resources
- Popular amplifiers
Latest Microcontroller Articles
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
MoreDaily News
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
Guess you like
- Reminiscing about the past! A brief discussion on the century-long history of radio development
- Learn embedded linux c programming from practice
- What are the benefits of changing the synchronous rectification power supply to asynchronous rectification with an external diode?
- How to create a secure area for Flasher for secure burning?
- High-precision metering socket solution based on SDI7768
- [RVB2601 Creative Application Development] Feiyan Platform Product Creation
- SD and MMC device driver process in Linux
- A brief chat with friends who are interested in participating in the RSL10 Innovation Design Competition
- MSP430 MCU Example 6-LED Digital Tube Display
- STM32F100C4T6B internal structure