+ 2

Instead of writing <html> if I use it's binary code will it work?

/*computer understand 1s &0s */ will it get this:<0001101> instead of <html>

15th Nov 2020, 9:32 PM
Web Sad
Web Sad - avatar
12 Answers
+ 4
EDIT: check David Carroll 's answer Web assembly might be the future of web developement and it will support binary, but if you are writing classic html, css, js programs then it won't with
16th Nov 2020, 1:04 AM
Bhavya
Bhavya - avatar
+ 8
Web Sad As explained by Martin Taylor ... That would be a no if attempting to pass those instructions via the browser. That said... the HTML does eventually get converted into instructions that get processed by the CPU and read as binary. 😉
15th Nov 2020, 11:55 PM
David Carroll
David Carroll - avatar
+ 7
Not exactly, but the characters in the html file represent text, which can represnt binary Sadly that will not work
15th Nov 2020, 11:51 PM
Galaxy-Coding (inactive)
Galaxy-Coding (inactive) - avatar
+ 6
Bhavya It's doubtful on at least 2 counts... 1. WASM won't have access to the DOM, which ultimately would be part of the flow for HTML to DOM to bytecode to native CPU instructions. 2. WASM is the compiled build target of LLVM IR (intermediate representation) of a higher level language like C++, C#, Kotlin, etc. That is, we can write code in a higher level language, compile to LLVM IR which is then compiled to WASM. But that WASM still needs to be compiled to a baseline WASM bytecode, then compiled again into the resulting native code optimized for a given CPU architecture. As you can see, there's still a good number of steps beyond WASM before binary is resolved. So... it's highly unlikely WASM would parse binary instructions for a given CPU.
16th Nov 2020, 11:39 PM
David Carroll
David Carroll - avatar
+ 6
While the OP is likely asking this in the most basic and literal of ways... it's more interesting to think of this at the more abstract and conceptual levels. Consider the point in time where HTML is loaded and parsed by the browser. The HTML is essentially being executed as declarative programming instructions to initialize and load the DOM into memory. To this degree, the markup language, as unpopular and uncomfortable as that might be for many, is in fact, a special, domain specific programming language. At this point, Javascript is able to manipulate the loaded DOM as well. The DOM, loaded in memory, rich with events and event handlers, will trigger updates to the browser rendering engine which ultimately results in sending the CPU (or GPU) the proper instructions for controlling each illuminated pixel. It's the set of binary instructions applied to a set of affected pixels that I found interesting for this question. Granted, this description is still an oversimplification of what's happening.
17th Nov 2020, 9:42 PM
David Carroll
David Carroll - avatar
+ 5
I find this question very interesting
17th Nov 2020, 12:12 AM
Galaxy-Coding (inactive)
Galaxy-Coding (inactive) - avatar
+ 4
David Carroll nice details about wasm
17th Nov 2020, 10:57 AM
Bhavya
Bhavya - avatar
+ 4
Rashed-Ul Anwar It's only ODD if the first bit is ON. Otherwise, it would be quite EVEN. đŸ€ŁđŸ˜‚
17th Nov 2020, 6:29 PM
David Carroll
David Carroll - avatar
+ 3
I am in no way an expert, but no code anyone writes is directly processed by the cpu (idk about assembly though). Most programming languages are either interpreted or compiled, so theres a layer between the code and the cpu. HTML isnt even a programming language, so even if you could write code like that it wouldnt work. HTML is more like browser code than cpu code; its interpreted by the browser rather than a compiler or interpreter. Sorry if this is wrong, I am not very experienced in how programming relates to hardware (unlike David Carroll , hes like an expert at this stuff.)
17th Nov 2020, 8:15 PM
Aria
Aria - avatar
+ 1
test it and see for yourself
15th Nov 2020, 11:32 PM
Logomonic Learning
Logomonic Learning - avatar
+ 1
did you test it yet?
16th Nov 2020, 1:05 AM
Logomonic Learning
Logomonic Learning - avatar
+ 1
Web Sad Bro....Honestly speaking it will be very ODD using binary numbers....
17th Nov 2020, 5:07 PM
Rashed-Ul Anwar
Rashed-Ul Anwar - avatar