What Are Bits and Bytes

This section describes bits and bytes as data storage units and as data types.

Bit - The smallest storage unit in the computer world. It can only hold two possible values: 0 and 1.

Bit - The smallest unit of measure of digital information size.

Bit - A single digit of a binary number. It can only have two possible values: 0 and 1.

Byte - A storage unit with 8 bits. A byte can hold 256 possible values.

Byte - A unit of measure of digital information size. 1 byte = 8 bits. For example, a Java source code file, Hello.java, has a size of 109 bytes.

Byte - A data type in many programming language. It can be used to store 256 possible integer values. In Java, 'byte' is a primitive data type that can store an integer value in the range of -128 and 127.

Table of Contents

 About This Book

 JDK - Java Development Kit

 Execution Process, Entry Point, Input and Output

 Primitive Data Types and Literals

 Control Flow Statements

Bits, Bytes, Bitwise and Shift Operations

What Are Bits and Bytes

 "byte" Data Type and Implicit Casting

 Operations on "byte" Data Type Values

 Bitwise Operations on "byte" Values

 Bitwise Operations on "byte" Values - Example Program

 Shift Operations - Left, Right or Unsigned Right

 Managing Bit Strings in Byte Arrays

 Reference Data Types and Variables

 Enum Types and Enum Constants

 StringBuffer - The String Buffer Class

 System Properties and Runtime Object Methods

 Generic Classes and Parameterized Types

 Generic Methods and Type Inference

 Lambda Expressions and Method References

 Java Modules - Java Package Aggregation

 Execution Threads and Multi-Threading Java Programs

 ThreadGroup Class and "system" ThreadGroup Tree

 Synchronization Technique and Synchronized Code Blocks

 Deadlock Condition Example Programs

 Garbage Collection and the gc() Method

 Assert Statements and -ea" Option

 Annotation Statements and Declarations

 Java Related Terminologies

 Archived Tutorials

 References

 Full Version in PDF/EPUB