Logic and integer arithmetic

A look at the bytecodes of the Java virtual machine that perform logical and arithmetic operations

1 2 Page 2
Page 2 of 2
You need a Java-enabled browser to view this applet.

Click here for the source code of Logical Results, or here for the source code of Exposed Int.

Bill Venners has been writing software professionally for 12 years. Based in Silicon Valley, he provides software consulting and training services under the name Artima Software Company. Over the years he has developed software for the consumer electronics, education, semiconductor, and life insurance industries. He has programmed in many languages on many platforms: assembly language on various microprocessors, C on Unix, C++ on Windows, Java on the Web. He is author of the book: Inside the Java Virtual Machine, published by McGraw-Hill.

Learn more about this topic

  • Previous Under The Hood articles:
  • The lean, mean virtual machine -- Gives an introduction to the Java virtual machine. Look here to see how the garbage collected heap fits in with the other parts of the JVM.
  • The Java class file lifestyle -- Gives an overview to the Java class file, the file format into which all Java programs are compiled.
  • Java's garbage-collected heap -- Gives an overview of garbage collection in general and the garbage-collected heap of the Java virtual machine in particular.
  • Bytecode basics -- Introduces the bytecodes of the JVM, and discusses primitive types, conversion operations, and stack operations in particular.
  • Floating point arithmetic -- Discusses the Java virtual machine's floating point support and the bytecodes that perform floating point arithmetic.

1 2 Page 2
Page 2 of 2