Pricefield | Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@[email protected] to Programmer [email protected]English • 2 years ago

counting

lemmy.world

message-square
48
fedilink
441

counting

lemmy.world

@[email protected] to Programmer [email protected]English • 2 years ago
message-square
48
fedilink
alert-triangle
You must log in or register to comment.
  • 👍Maximum Derek👍
    link
    fedilink
    English
    13•
    edit-2
    2 years ago

    Nah. 1,2,4,8,16… or 1, 10, 100, 1000, 10000, depending on how you look at it.

    • @[email protected]
      link
      fedilink
      English
      3•2 years ago

      You use more than one finger at once.

      • @[email protected]
        link
        fedilink
        2•2 years ago

        I don’t know many people who count like 👍☝️🖕, so you kinda already do. You’re just allowing more combinations

        • @[email protected]
          link
          fedilink
          English
          1•2 years ago

          Good point.

  • Destide
    link
    fedilink
    English
    1•2 years ago

    Haaaaaang on is that why we start on 0…

    • LazaroFilm
      link
      fedilink
      English
      1•2 years ago

      Because if you convert it back to binary, you have 0x0000 and that is one extra bit you can use instead of limiting your available values.

    • macniel
      link
      fedilink
      5•2 years ago

      No. We count start at zero because the array already starts with an element of a specific size. Starting at 1 would always skip that initial element.

      • @[email protected]
        link
        fedilink
        English
        8•
        edit-2
        2 years ago

        You could have “empty arrays” in a language if you wanted. The real reason is that you start with an offset of zero as you read an array from memory at hardware level, and so this way address is just “start address + element size * element number”.

      • @[email protected]
        link
        fedilink
        4•
        edit-2
        2 years ago

        No, we start counting at one. We start indexing at zero.

        An array with one element has an element count of 1, and that element would be at index 0.

        • LaggyKar
          link
          fedilink
          2•2 years ago

          This is how we end up with off-by-one errors

  • @[email protected]
    link
    fedilink
    25•2 years ago

    counting != indexing

    • @[email protected]
      link
      fedilink
      1•2 years ago

      ^^

  • Semi-Hemi-Demigod
    link
    fedilink
    39•2 years ago

    If you count in binary you can get to 31 on one hand, and 2,047 on two hands

    • LazaroFilm
      link
      fedilink
      English
      7•2 years ago

      It really turns into Naruto style ninjitsu.

    • @[email protected]
      link
      fedilink
      5•2 years ago

      One hand would be 2**5 = 32 (0 to 31) and two would be 2**10 = 1024 (0 to 1023).

      And if you use 3 states per finger (down, half raised and raised), you can have 3**10 = 59049 (0 to 59048).

      • Ludwig van Beethoven
        link
        fedilink
        English
        1•2 years ago

        nah, you can have 16+8+4+2+1 = 31 on one hand, and 1024+512+256+128+64+32+16+8+4+2+1=2047 on two hands.

      • Cethin
        link
        fedilink
        English
        2•2 years ago

        I don’t count to 1024 over often (literally never) so I don’t feel the need to go to trinary.

    • @[email protected]
      link
      fedilink
      14•2 years ago

      I’m not flipping you off, i just counted to 4

      19 is the rock and roll symbol

      22 is the shocker

      Assuming you use your thumb as the first bit

      • Semi-Hemi-Demigod
        link
        fedilink
        12•2 years ago

        I taught my kids how to do it and for a while they’d tell each other to binary four off

        • Tippon
          link
          fedilink
          English
          8•2 years ago

          My seven year old did something similar. At least once a day I’d hear ‘Dad, Dad, I’m counting to four!’ and see the little shit flipping me off and laughing hysterically :D

  • Arthur Besse
    link
    fedilink
    73•
    edit-2
    2 years ago

    0 ✊

    1 👍

    2 ☝️

    3 👆

    4 🖕

    • CaptainBlagbird
      link
      fedilink
      12•2 years ago

      6 ✌️

      17 🤙

      18 🤘

      19 🤟

      28 👌

      31 ✋

      • @[email protected]
        link
        fedilink
        2•2 years ago

        1 👆

        2 👆

        3 👆

        4 🖕

        5 🖕

        6 🖕

    • @[email protected]
      link
      fedilink
      24•
      edit-2
      2 years ago

      Hey, fourck you too, man.

      • @[email protected]
        link
        fedilink
        English
        10•2 years ago

        Well, 132 you!

        • CaptainBlagbird
          link
          fedilink
          1•
          edit-2
          2 years ago

          2 guys, or I’ll 0 you both! 1?

          • @[email protected]
            link
            fedilink
            3•2 years ago

            Why did 2 break up with zero?

            Some 1 got between them!

  • @[email protected]
    link
    fedilink
    8•2 years ago

    Someone is confusing indices and cardinality.

  • gregorum
    link
    fedilink
    English
    4•2 years ago

    THERE ARE FOUR LIGHTS!

  • sheepishly
    link
    fedilink
    1•2 years ago

    I literally did this the other day… to be fair, it was a list starting with the number zero.

  • @[email protected]
    link
    fedilink
    1•2 years ago

    LUN is life.

  • @[email protected]
    link
    fedilink
    6•2 years ago

    Base 5 is based

    • @[email protected]
      link
      fedilink
      1•2 years ago

      Don’t you mean base 10?

      Also, clearly seximal is the best

    • AlmightySnoo 🐢🇮🇱🇺🇦
      link
      fedilink
      7•2 years ago

      The French used to count in base 20 (so that means both hands and both feet), which is why they read 97 as quatre-vingt-dix-sept, ie 4*20+10+7.

      • @[email protected]
        link
        fedilink
        3•2 years ago

        One of the reasons why I hate learning French so much.

    • @[email protected]
      link
      fedilink
      1•2 years ago

      coworker taught me this and it blew my mind. I had previously jokingly used base 2 with my hands, but something like 01001 10010 would be difficult to handle.

      • @[email protected]
        link
        fedilink
        2•
        edit-2
        2 years ago

        Base 2 should be easy to add, but it requires effort to convert

        • @[email protected]
          link
          fedilink
          1•2 years ago

          It gets easier with practice

  • LazaroFilm
    link
    fedilink
    English
    2•
    edit-2
    2 years ago

    0 1 10 11 100

  • @[email protected]
    link
    fedilink
    1•2 years ago

    Fun fact: when learning some instruments (e.g. bowed instruments) you also number the fingers starting from your index (because you don’t play with the thumb)

  • Patapon Enjoyer
    link
    fedilink
    2•2 years ago

    I’ve watched Inglorious Basterds I’m not falling for that trick

  • Subverb
    link
    fedilink
    1•2 years ago

    AKschually, thumbs aren’t fingers.

  • Sundray
    link
    fedilink
    English
    4•2 years ago

    “Please count to 10.”

    “… um, I’ve run out of fingers.”

    • @[email protected]
      link
      fedilink
      2•2 years ago

      You only need two fingers for that though

Programmer [email protected]

[email protected]
Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user / day
  • 78 users / week
  • 455 users / month
  • 1.54K users / 6 months
  • 4 subscribers
  • 1.82K Posts
  • 38.5K Comments
  • Modlog
  • mods:
  • @[email protected]
  • @[email protected]
  • UI: 0.18.4
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org