Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2017
    Rep Power

    Default Trying to understand bits on stack and heap


    I try to understand how a computer works and how a programming language is communicating with your computer.
    Lets just say for explaining purposes everybody has windows. A computer can have a 32bit windows or a 64 bit windows.

    Does that mean that on a 32bit windows there can only be 32xzero's/one's 01000010010101111001101etc. as maximum value to communicatie with the memory.
    But a 64bit windows can even have 64xzero'/one's 01001110101101111110101010110101111100000111011etc . maximum value to communicate with the memory?
    Am I thinking correct now, or am I totally wrong?

    About programming languages. The stack can only have a maximum value of 8bits so thats 00010011 max right? So bool, float, long, byte, int. etc.
    The heap can have a bigger value then 8bits, but what value is this? Between 1-32bit on a 32bit windows machine and lets say between 1-64bits on a 64bit windows machine?
    Can an object for example also have a random number like 10bits or 26bits on the heap? Or has it always standard values like 8, 16, 32 48, or 64bit.

    Kind regards, Jimme

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: Trying to understand bits on stack and heap

    Moved from Advanced Section - This is generic computer stuff.
    Last edited by Norm; 04-17-2017 at 07:35 PM.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Northern Virginia, United States
    Rep Power

    Default Re: Trying to understand bits on stack and heap

    For you first topic, you should read up on computer architectures. For the second topic you should read up on language design and stacks vs heaps. There is quite a bit written on these topics so there is no point in rehashing it here.

    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. Stack and Heap memory object allocation
    By sandybo in forum New To Java
    Replies: 3
    Last Post: 01-13-2017, 02:13 AM
  2. Heap and Stack, equality testing.
    By Fatz in forum New To Java
    Replies: 0
    Last Post: 05-18-2012, 10:53 PM
  3. Heap or Stack
    By Metaferia in forum New To Java
    Replies: 3
    Last Post: 01-17-2011, 07:14 PM
  4. The Stack and the Heap
    By al_Marshy_1981 in forum New To Java
    Replies: 9
    Last Post: 06-25-2010, 10:45 AM
  5. Help with heap and stack
    By coco in forum Advanced Java
    Replies: 1
    Last Post: 08-06-2007, 03:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts