Are Hardware and Software the Same Thing?

Поділитися
Вставка
  • Опубліковано 26 тра 2023
  • (Corrections below) What's the difference between computer hardware and computer software? In reality, not much. While software is an arrangement of CPU instructions that tell the computer what to do in order to reach a certain result, hardware is just an arrangement of physical elements that, from a certain input, give a certain output. At the end of the day both hardware and software carry out planned arithmetic. Because all that is happening is math, then hardware can be emulated by software (which is running on hardware), software can be directly translated to hardware.
    Hardware is often designed through software. FPGAs are a kind of reprogrammable hardware that allow the user to change the physical blocks inside of the chip and produce results similar to an ASIC. In this video I also show the process of taking an idea and turning it into a physical circuit through Verilog programming and FPGA testing.
    Sources:
    • Circuit board blowing up
    www.fpga4student.com/2017/09/...
    circuitverse.org/
    learn.microsoft.com/en-us/win...
    Corrections:
    32 and 64 refer to the size of the registers, not the number of registers. While x86 and x64 have 8 and 16 general purpose registers respectively, the total number of registers is greater than 8 or 16, but not tied to 32 or 64. I've added a correction above.There are some 32 bit CPU architectures that have exactly 32 registers, like MIPS.
    Read more: reverseengineering.stackexcha...
  • Наука та технологія

КОМЕНТАРІ • 56

  • @smartperson1
    @smartperson1 Рік тому +48

    I'm not sure where I expected this video to go, but I never expected it would end with you buying an FPGA dev board from China and programming it in Quartus. Good job!

  • @tactics40
    @tactics40 11 місяців тому +43

    When you say a machine is "32-bit" that doesn't mean 32 registers.... It means each register is 32 bits wide.

    • @BogdanSass
      @BogdanSass 11 місяців тому +4

      Came to the comments looking for this. :)
      The only explanation for the phrasing in the video would be if he was thinking of registers at the bit level, with 32 "registers" (bits) for storing data. But it is a stretch...

    • @mikafoxx2717
      @mikafoxx2717 4 місяці тому

      Yeah.. that's a bit of a misspeak. Just for example, x86 has a lot of odd registers of different sizes, whereas RISC-V might have 16, or 32 registers no matter if it's 32 or 64 bit (or 128 bit?), depending if it's got an (E)mbedded extension.

    • @minefacex
      @minefacex 2 місяці тому

      Yep, I was just about to write this LOL

  • @anon_y_mousse
    @anon_y_mousse Рік тому +41

    So the short answer is "no" and the long answer is "yes". I like it.

    • @illford6921
      @illford6921 11 місяців тому +2

      In my eyes, they're 1 part of the same machine with both parts being necessary. The hardware is like the nervous system and heart, but the software is like the mind, muscles and flesh. Both are important to an animal and are required

    • @anon_y_mousse
      @anon_y_mousse 11 місяців тому +3

      @@illford6921 I was sort of making a joke here, because in truth they're merely different ways of implementing an algorithm. Software is basically incomplete hardware and hardware is the culmination of that effort to implement an algorithm.

    • @andybrice2711
      @andybrice2711 11 місяців тому +2

      I'd say the longer and most correct answer is: In some circuits (such as FPGAs and EEPROMs) the distinction between hardware and software is not clear-cut.

    • @conorstewart2214
      @conorstewart2214 4 місяці тому

      @@illford6921 except hardware can exist without software but software can’t exist without hardware. Hardware doesn’t need to be programmable and doesn’t need to take a list of instructions. Think about an 8 bit adder IC, it can perform the operation of adding two 8 bit numbers but it doesn’t need any software to do so. In a similar way any operation can be implemented purely in hardware with no software as is often done in the case of ICs and ASICs.
      So in your analogy hardware is capable of being everything, the whole animal. However hardware on its own is fixed in what it does, you create a hardware circuit and it does what it does and never changes.
      That’s why we add software. It is similar to analogue computing vs digital computing, analogue computing can be much more powerful but digital computing is easier and more general. Implementing your system in hardware generally means higher performance but it means it is harder to design and change, however with software it is lower performance but you can change the overall function of the device just by changing its code which is easier and quicker than redesigning the hardware and building a new circuit.
      So both parts are not necessary for a functional system, all you really need is hardware, however software makes things a lot easier but it can’t work without hardware to run on.

  • @mekafinchi
    @mekafinchi 11 місяців тому +19

    I don't think the way in which something is designed has anything to do with whether it's hardware or software or has any bearing on the relationship between the two.
    This is mostly directed at other commentors, but the distinction between hardware and software is whether they can be changed without physically modifying the device. A design put on an FPGA is software and the same design put on an ASIC (custom chip) is hardware, even if they share the same source code.
    The kind of software that you could change but probably won't (often) change outside of the design phase, as seen on FPGAs, is generally distinguished as firmware.

    • @musaran2
      @musaran2 9 місяців тому

      Yup, it is a spectrum.
      "Software" or "code" fundamentally means a super easy way to reconfigure what the hardware does.
      That was the fundamental invention turning calculator circuits into computers.

  • @LeWolfYT
    @LeWolfYT Рік тому +6

    as always, very high quality and interesting!

  • @mattgio1172
    @mattgio1172 Рік тому +4

    Today Start!! hahahaha
    Amazing video - it's a really astute argument you make, and one I hadn't considered before. It's amazing that when you break it down far enough, the line between software and hardware gets very blurry.

    • @InfernosReaper
      @InfernosReaper Рік тому +1

      Yeah, I once thought I was brilliant when I had the idea to program a microcontroller to explicitly emulate hardware and then I found out about FPGA and was like, "oh, someone stole my idea, did it better, and beat to it by years before I was born"

  • @AverageMichaelJordans
    @AverageMichaelJordans Рік тому +5

    Thanks for that unicode tip! I was gonna send something cool here with that but turns out you can't :(

  • @sdjhgfkshfswdfhskljh3360
    @sdjhgfkshfswdfhskljh3360 11 місяців тому +6

    Of course, software and hardware are different things.
    But more important question is what makes them unique and under which circumstances specific hardware can be swapped with generic hardware + specific software.
    It is important because in some cases right decision may save money or even improve quality of the product.
    What you mentioned briefly - designing _any_ hardware as software - is important topic too. Looks like lots of hardware manufacturers just clump components together, without deep thinking about why they choose specific component and what properties of final product it defines.
    Having possibility to create product specifications and automatically obtain blueprints of corresponding hardware would be great technology, but looks like humanity is not ready for it yet.

  • @Zeekblitz
    @Zeekblitz Рік тому +7

    Umm... A 32 bit CPU does not have 32 registers.. nor does a 64 bit CPU have 64 registers... A simple Google search will show that there's only 8 registers in the x86 Intel architecture. 32 bit means each register can hold up to a 32 bit value as in 2^32. Same for 64 bit.

    • @InkboxSoftware
      @InkboxSoftware  Рік тому +7

      Thank you, you are correct. 32 and 64 refer to the size of the registers, not the number of registers. While x86 and x64 have 8 and 16 general purpose registers respectively, the total number of registers is greater than 8 or 16, but not tied to 32 or 64. I've added a correction above.
      Source: reverseengineering.stackexchange.com/questions/19693/how-many-registers-does-an-x86-64-cpu-actually-have
      There are some 32 bit CPU architectures that have exactly 32 registers, like MIPS.

    • @mekafinchi
      @mekafinchi 11 місяців тому +4

      There are many ISAs with 32 registers - PowerPC for example. A slightly less simple google search will tell you there are considerably more than 8 registers in x86, too.
      The original 16 bit x86 had 14 16-bit registers - 4 general purpose, 3 pointers, 4 segment regs, 2 index regs, and flags. Then there are the 8 x87 floating point registers, which are 80-bit. That's 22 registers and we're not even 32 bit! There're also a slew of control and debug registers that get sprinkled in but they're too special purpose to count.
      32 bit x86 extended the existing registers and added two segment registers (24!) The MMX and SSE extensions renamed and extended the existing x87 registers respectively.
      64 bit x86 is where the registers start just pouring in. x86-64 extended the existing registers again and added 8 general purpose registers and 8 SSE registers (40!). AVX extended the SIMD registers again, and AVX-512 extended them and doubled their amount (56!). The SIMD registers are 512 bits each, and there're 32 of them!
      Anyways, although you're still right that there aren't 32 registers in 32 bit cpus or 64 registers in 64 bit cpus, the number is nowhere near 8. There're actually a bit more than 32 and 64 respectively if you count all the niche control registers I didn't mention.

    • @Zeekblitz
      @Zeekblitz 11 місяців тому +3

      @@mekafinchi I know that there are processors that have >8 registers but I felt the video was implying that 32 bit == 32 registers but that's not the case.

    • @yippy7951
      @yippy7951 9 місяців тому

      ​@@mekafinchi​ He said there are 8 *general purpose* registers in x86 processors.
      In your example of the first 16bit x86 CPU, there are only 4 general purpose registers.

  • @derikdotnet
    @derikdotnet Рік тому +3

    Wooooo first! Love your videos man

  • @samconnelly7630
    @samconnelly7630 11 місяців тому +2

    Errata: 1:13 He meant 32 bits per register on 32-bit, and 64 bits per register on 64-bit. The amount of registers per core is independent of the number of bits per register, and is solely based off the instruction set architecture. x86_64 has 16 total registers, excluding extensions, while MMIX en.wikipedia.org/wiki/MMIX which has 256 general-purpose registers!

  • @monad_tcp
    @monad_tcp 4 місяці тому

    I answer yes to that question, in theory a compiler would be able to transform a program directly into hardware or into a mix of software and hardware co-optimized for maximum execution speed.

  • @Zicrus
    @Zicrus 6 місяців тому +1

    3:17 The bitwise XNOR formula should be: ~(A^B)

  • @mynameusedtobelong
    @mynameusedtobelong Рік тому +8

    I couldn't stop thinking: this looks like a brain.

    • @ractheraccoon
      @ractheraccoon Рік тому +3

      i love that i immediately recognized where your name comes from

    • @mynameusedtobelong
      @mynameusedtobelong Рік тому +2

      @@ractheraccoon finally! someone get it :)

  • @NightpireVideos
    @NightpireVideos 8 місяців тому

    pretty cool, good job

  • @SnareX
    @SnareX 11 місяців тому +1

    Bro how low did you set that VM? I grew up through the progression and I never seen paint load that slow. I didn't have high spec stuff either

    • @SnareX
      @SnareX 11 місяців тому

      Then again loading Action 2.5 (precursor to flash) on my 486dx with 64mb ram took like 20+ minutes on windows 3.1

    • @SnareX
      @SnareX 11 місяців тому

      Im might be mixing up the ram with KB. I just remember dos saying close to 64,000

  • @channtron
    @channtron 11 місяців тому +2

    This, together with the question of, programming hardware is firmware? Are the type of questions that bring war into the Office...
    Nice video, i would LOVE to watch your opinión on where does firmware start, at the bare metal, the hdl, or the OS level. It's a heated argumento...

  • @satibel
    @satibel Рік тому +3

    the main difference is that making/changing software is basically free.

  • @minefacex
    @minefacex 2 місяці тому

    I think the thing you are trying to explain here is Turing-completeness. I am not sure if you knowingly did not mention it or do not know about it. In a more general way, even if a computer is not Turing-complete, both software instruction and hardware descriptions (and their phyisical implementations) are basically computational math personified in a way. Very good video nevertheless.

  • @heterodoxagnostic8070
    @heterodoxagnostic8070 11 місяців тому +1

    No open source FPGAs?

  • @Manabender
    @Manabender 11 місяців тому +1

    So the short version is: You argue that, at an abstract level, hardware and software are the same. Sound about right?

  • @samaeltheangelofdeath
    @samaeltheangelofdeath Рік тому +1

    SOOO.🤨🤔💭 like hermetica , shuffling a deck is putting it in order(8x) hot and cold same thing, different degrees... That's interesting. Soft hard.... Hmmm well...I don't really know what either are🤷‍♂️

  • @XiaZ
    @XiaZ 11 місяців тому

    I've been there like just like you. You will get over it.

  • @themetalgamer9864
    @themetalgamer9864 11 місяців тому +1

    So... does that mean that FPGA-based retro consoles, if given the correct instructions, act exactly the same as original hardware?

    • @InkboxSoftware
      @InkboxSoftware  11 місяців тому +1

      No, as the physical layout of the FPGA won't be the same as the original hardware. Ideally the FPGA would be mimicking the physical processes of the original system, but there it couldn't be a 1:1 copy. So it's basically physical emulation.

    • @themetalgamer9864
      @themetalgamer9864 11 місяців тому

      @@InkboxSoftware I'm confused. I know that software emulation can never be "perfect" because it runs in series rather than parallel, but what is the equivalent speed bump keeping FPGAs from being perfect?

    • @InkboxSoftware
      @InkboxSoftware  11 місяців тому +1

      An FPGA is a set of logic blocks that can be configured to mimic integrated circuits. But because of the fact that these aren't physical elements like a resistor or transistor, it simply isn't the exact same circuit. If an ASIC is a concrete block, then an FPGA would be a block made of bricks. On the macro-scale they can be the same shape and volume, and even serve the same purpose, but on the micro-scale they're made of different things, so in that way an FPGA can never be a 1:1 copy of an ASIC because they're just different things.

    • @mikafoxx2717
      @mikafoxx2717 4 місяці тому

      ​@@themetalgamer9864
      Software emulsion CAN be perfect, it's just slower to do so. FPGA's can take advantage of parallelism, so for instance the N64 graphics processor can run concurrently to the main CPU instead of doing one then another. FPGA design however are also usually not perfect, because the information needed to do so isn't fully reverse engineered, like what may happen when you change the microcode for the graphics co-processor from the default - which a few games implemented by getting more expensive development licences from Nintendo.

  • @jescis0
    @jescis0 9 місяців тому

    When did firmware get out of use? Firmware as I remember, was software on a chip(hardware)! Example Super Mario Bros. Source code is software but when the code is applied/programmed on a mask ROM, it becomes firmware! 🤔🤔 are we losing technobable? 🤯🤯😮😮

  • @crides0
    @crides0 11 місяців тому +1

    Obviously they are not the same. Software don't have that magic smoke to them

  • @mrgps4393
    @mrgps4393 11 місяців тому +1

    A simple answer is yes

  • @TheRojo387
    @TheRojo387 8 місяців тому

    Real computers are too cool for character ROMs. So I'm going about designing a pure computer, which deals in numbers only, to be adapted into a full-blown Turing machine, which can truly evoke potentially infinite memory. Thing is, most Turing systems in existence have just enough space for our daily needs already.

  • @callmetony1319
    @callmetony1319 Рік тому +3

    "There isn't any software! Only different internal states of hardware. It's all hardware! It's a shame programmers don't grok that better."
    The programmable FPGA is clearly different to a computer with programs stored in memory (software), but at the same time, there is no software anyway, in an absolute sense. "Software" is an abstraction (of computer hardware.) Is this what you were getting at?

  • @gk1370
    @gk1370 Місяць тому

    Looking for Computer Engineers in chat!
    👇

  • @jatigre1
    @jatigre1 11 місяців тому

    "Apparently" the aliens already have managed to fuse both in one, so in the presence of a determined field it performs a determined function, obviously not electromagnetic in nature, but aetheric (the EM spectrum is a byproduct of the aether).

  • @tototitui2
    @tototitui2 11 місяців тому

    Please don't listen to this. 32 bits and 64 bits have nothing to do with the number of registers.

  • @timseguine2
    @timseguine2 10 днів тому

    There is no hardware. Only bool.

  • @thomassynths
    @thomassynths 8 місяців тому

    Buying a cheap FPGA from china without documentation is not a steal. Time is money. Buy something you can actually get docs about.