EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / Is that integer size would be differ for every 16bit, 32bit controller??

Is that integer size would be differ for every 16bit, 32bit controller??

|

Microcontroller › Arduino › Is that integer size would be differ for every 16bit, 32bit controller??

  • This topic has 2 replies, 3 voices, and was last updated 8 years, 4 months ago by Ashutosh Bhatt.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • June 11, 2015 at 6:21 pm #3710
    gokul sridhar
    Participant

    Is that integer size would be differ for every 16bit, 32bit controller?

    Int   x;

    Is that now x will occupy different size in 16 bit,32 bit ??

    Then what about the short int, long int,double, — All vary on architecture of controller ??

    If we need to perform some 32 bit operations in 16 bit controller, how to do ??

    i think int take a single word size of the controller(if 8 bit — 8, 16 bit — 16 bit), 

    I am so confused. kindly answer me with clear data(if possible example)

     

    Thanks in Advance

    Gokul

     

     

     

     

    January 21, 2017 at 7:33 am #14353
    Hari Prasaath K
    Participant

    Hi,

    Integers are your primary data-type for number storage.

    On the Arduino Uno (and other ATMega based boards) an int stores a 16-bit (2-byte) value. This yields a range of -32,768 to 32,767 (minimum value of -2^15 and a maximum value of (2^15) – 1).
    On the Arduino Due and SAMD based boards, an int stores a 32-bit (4-byte) value. This yields a range of -2,147,483,648 to 2,147,483,647 (minimum value of -2^31 and a maximum value of (2^31) – 1).

    January 25, 2017 at 7:03 pm #14369
    Ashutosh Bhatt
    Participant

    it depends upon which cross compiler tool you are using

    in normal C language int means 2 byte of memory

    in all the controllers int type variable has 16 bit only

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • PIC KIT 3 not able to program dsPIC June 19, 2025
  • Back to the old BASIC days June 19, 2025
  • using a RTC in SF basic June 19, 2025
  • what's it's name June 19, 2025
  • What is correct names for GOOD user friendly circuit drawing program? June 18, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise